|
@@ -19,10 +19,12 @@ luticate.config(['$stateProvider', '$urlRouterProvider', '$httpProvider',
|
19
|
19
|
$stateProvider.state('root', {
|
20
|
20
|
abstract: true,
|
21
|
21
|
template: '<div ui-view=""></div>',
|
22
|
|
- resolve: ['luticateAuthUsers', function(luticateAuthUsers)
|
23
|
|
- {
|
24
|
|
- return luticateAuthUsers.loadUserData(null);
|
25
|
|
- }]
|
|
22
|
+ resolve: {
|
|
23
|
+ userData: ['luticateAuthUsers', function(luticateAuthUsers)
|
|
24
|
+ {
|
|
25
|
+ return luticateAuthUsers.loadUserData(null);
|
|
26
|
+ }]
|
|
27
|
+ }
|
26
|
28
|
});
|
27
|
29
|
|
28
|
30
|
$stateProvider.state('login',{
|
|
@@ -98,7 +100,7 @@ luticate.config(['$stateProvider', '$urlRouterProvider', '$httpProvider',
|
98
|
100
|
}]);
|
99
|
101
|
|
100
|
102
|
}])
|
101
|
|
- .run(['$rootScope', '$state', 'luticateAuthUsers',function ($rootScope, $state, luticateAuthUsers) {
|
|
103
|
+ .run(['$rootScope', '$state',function ($rootScope, $state) {
|
102
|
104
|
$rootScope.$on('$stateChangeError', function (e, curr, prev) {
|
103
|
105
|
//$state.go('login');
|
104
|
106
|
});
|