Commit 66abb3310e25d6a5055a0a78120018b36c59168f
1 parent
9571bf30
Exists in
master
and in
38 other branches
Fix profile query
Showing
4 changed files
with
8 additions
and
11 deletions
Show diff stats
src/app/index.config.js
... | ... | @@ -6,16 +6,11 @@ |
6 | 6 | .config(config); |
7 | 7 | |
8 | 8 | /** @ngInject */ |
9 | - function config($logProvider, toastrConfig) { | |
9 | + function config($logProvider, $locationProvider) { | |
10 | 10 | // Enable log |
11 | 11 | $logProvider.debugEnabled(true); |
12 | 12 | |
13 | - // Set options third-party lib | |
14 | - toastrConfig.allowHtml = true; | |
15 | - toastrConfig.timeOut = 3000; | |
16 | - toastrConfig.positionClass = 'toast-top-right'; | |
17 | - toastrConfig.preventDuplicates = true; | |
18 | - toastrConfig.progressBar = true; | |
13 | + $locationProvider.html5Mode({enabled: true}); | |
19 | 14 | } |
20 | 15 | |
21 | 16 | })(); | ... | ... |
src/app/index.route.js
src/app/main/main.controller.js
... | ... | @@ -5,16 +5,17 @@ |
5 | 5 | .module('angular') |
6 | 6 | .controller('MainController', MainController); |
7 | 7 | |
8 | + | |
8 | 9 | /** @ngInject */ |
9 | - function MainController($timeout, noosfero, $log) { | |
10 | + function MainController($timeout, noosfero, $log, $routeParams) { | |
10 | 11 | var vm = this; |
11 | 12 | vm.boxes = []; |
12 | 13 | activate(); |
13 | 14 | |
14 | 15 | function activate() { |
15 | - noosfero.communities().get({id: 67, private_token: '1b00325e5f769a0c38550bd35b3f1d64'}).$promise.then(function (profile) { | |
16 | + noosfero.communities().get({identifier: $routeParams.profile, private_token: '1b00325e5f769a0c38550bd35b3f1d64'}).$promise.then(function (profile) { | |
16 | 17 | $log.log(profile); |
17 | - vm.owner = profile.community; | |
18 | + vm.owner = profile.communities[0]; | |
18 | 19 | }); |
19 | 20 | } |
20 | 21 | ... | ... |