Commit 45cc94c3346f87c925e0fa27b7ebe781ba942454
1 parent
fe5e2a59
Exists in
master
and in
38 other branches
Fix the way that a profile is shared between controllers
Showing
3 changed files
with
3 additions
and
3 deletions
Show diff stats
src/app/content-viewer/content-viewer.controller.js
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | activate(); |
15 | 15 | |
16 | 16 | function activate() { |
17 | - vm.profile = $scope.vm.owner; | |
17 | + vm.profile = noosfero.currentProfile; | |
18 | 18 | noosfero.profiles.one(vm.profile.id).one('articles').get({path: $stateParams.page}).then(function(response) { |
19 | 19 | vm.article = response.data.article; |
20 | 20 | }); | ... | ... |
src/app/profile-info/profile-info.controller.js
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | activate(); |
15 | 15 | |
16 | 16 | function activate() { |
17 | - vm.profile = $scope.vm.owner; | |
17 | + vm.profile = noosfero.currentProfile; | |
18 | 18 | noosfero.profiles.one(vm.profile.id).one('activities').get().then(function(response) { |
19 | 19 | vm.activities = response.data.activities; |
20 | 20 | }); | ... | ... |
src/app/profile/profile-home.controller.js
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | activate(); |
13 | 13 | |
14 | 14 | function activate() { |
15 | - vm.profile = $scope.vm.owner; | |
15 | + vm.profile = noosfero.currentProfile; | |
16 | 16 | noosfero.profile(vm.profile.id).customGET('home_page', {fields: 'path'}).then(function(response) { |
17 | 17 | if(response.data.article) { |
18 | 18 | $state.transitionTo('main.profile.page', {page: response.data.article.path, profile: vm.profile.identifier}, {location: false}); | ... | ... |