diff --git a/src/app/content-viewer/content-viewer.controller.js b/src/app/content-viewer/content-viewer.controller.js index 76abc08..5ed161a 100644 --- a/src/app/content-viewer/content-viewer.controller.js +++ b/src/app/content-viewer/content-viewer.controller.js @@ -7,14 +7,13 @@ /** @ngInject */ - function ContentViewerController(noosfero, $log, $stateParams, $state) { + function ContentViewerController(noosfero, $log, $stateParams, $scope) { var vm = this; vm.article = null; activate(); function activate() { - console.log($state.current.data); - noosfero.communities.one($state.current.data.profile.id).one('articles').get({path: $stateParams.page}).then(function(articles) { + noosfero.communities.one($scope.vm.owner.id).one('articles').get({path: $stateParams.page}).then(function(articles) { $log.log(articles); vm.content = articles.article; }); diff --git a/src/app/index.route.js b/src/app/index.route.js index 95bf1dc..dcbe692 100644 --- a/src/app/index.route.js +++ b/src/app/index.route.js @@ -13,10 +13,7 @@ url: '/:profile', templateUrl: 'app/profile/profile.html', controller: 'ProfileController', - controllerAs: 'vm', - data: { - profile: null - } + controllerAs: 'vm' }) .state('profile.page', { url: '/{page:.*}', diff --git a/src/app/profile/profile.controller.js b/src/app/profile/profile.controller.js index 5edf1d0..4c51b3f 100644 --- a/src/app/profile/profile.controller.js +++ b/src/app/profile/profile.controller.js @@ -16,7 +16,6 @@ noosfero.communities.one().get({private_token: '1b00325e5f769a0c38550bd35b3f1d64', identifier: $stateParams.profile}).then(function(communities) { $log.log(communities); vm.owner = communities.communities[0]; - $state.current.data.profile = vm.owner; }); } -- libgit2 0.21.2