Commit 56475a644d13c70b3e9081fc3dc11d0e27449f44
1 parent
8700980c
Exists in
master
and in
1 other branch
Fix shared parameters
Showing
3 changed files
with
3 additions
and
8 deletions
Show diff stats
src/app/content-viewer/content-viewer.controller.js
| ... | ... | @@ -7,14 +7,13 @@ |
| 7 | 7 | |
| 8 | 8 | |
| 9 | 9 | /** @ngInject */ |
| 10 | - function ContentViewerController(noosfero, $log, $stateParams, $state) { | |
| 10 | + function ContentViewerController(noosfero, $log, $stateParams, $scope) { | |
| 11 | 11 | var vm = this; |
| 12 | 12 | vm.article = null; |
| 13 | 13 | activate(); |
| 14 | 14 | |
| 15 | 15 | function activate() { |
| 16 | - console.log($state.current.data); | |
| 17 | - noosfero.communities.one($state.current.data.profile.id).one('articles').get({path: $stateParams.page}).then(function(articles) { | |
| 16 | + noosfero.communities.one($scope.vm.owner.id).one('articles').get({path: $stateParams.page}).then(function(articles) { | |
| 18 | 17 | $log.log(articles); |
| 19 | 18 | vm.content = articles.article; |
| 20 | 19 | }); | ... | ... |
src/app/index.route.js
src/app/profile/profile.controller.js
| ... | ... | @@ -16,7 +16,6 @@ |
| 16 | 16 | noosfero.communities.one().get({private_token: '1b00325e5f769a0c38550bd35b3f1d64', identifier: $stateParams.profile}).then(function(communities) { |
| 17 | 17 | $log.log(communities); |
| 18 | 18 | vm.owner = communities.communities[0]; |
| 19 | - $state.current.data.profile = vm.owner; | |
| 20 | 19 | }); |
| 21 | 20 | } |
| 22 | 21 | ... | ... |