From 83328847592b460a75075c95cc96968d2ebdadcc Mon Sep 17 00:00:00 2001 From: Leonardo Merlin Date: Mon, 7 Sep 2015 15:35:11 -0300 Subject: [PATCH] Add 'participe' action to proposal-related --- src/app/components/proposal-related/proposal-related.directive.js | 13 ++++++++++++- src/app/components/proposal-related/proposal-related.html | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/app/components/proposal-related/proposal-related.directive.js b/src/app/components/proposal-related/proposal-related.directive.js index 3c42e1d..79f1575 100644 --- a/src/app/components/proposal-related/proposal-related.directive.js +++ b/src/app/components/proposal-related/proposal-related.directive.js @@ -9,10 +9,11 @@ function proposalRelated() { /** @ngInject */ - function ProposalRelatedController($log) { + function ProposalRelatedController($state, $log) { $log.debug('ProposalRelatedController'); var vm = this; + vm.$state = $state; vm.$log = $log; vm.init(); @@ -23,6 +24,16 @@ // var vm = this; }; + ProposalRelatedController.prototype.showContent = function (program) { + var vm = this; + + vm.$state.go('programa-conteudo', { + slug: program.slug + }, { + location: true + }); + }; + var directive = { restrict: 'E', templateUrl: 'app/components/proposal-related/proposal-related.html', diff --git a/src/app/components/proposal-related/proposal-related.html b/src/app/components/proposal-related/proposal-related.html index f5043da..e9eca78 100644 --- a/src/app/components/proposal-related/proposal-related.html +++ b/src/app/components/proposal-related/proposal-related.html @@ -7,6 +7,9 @@ +