app.route.js
1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
(function (){
'use strict';
angular.module('sbAdminApp')
.config(function ($stateProvider, $urlRouterProvider, USER_ROLES){
$urlRouterProvider.otherwise('/login');
$stateProvider
.state('app', {
url: '/app',
abstract: true,
templateUrl: 'app/components/navigation/template/navigation.html',
controller: 'MainController',
controllerAs: 'vm'
})
.state('login', {
url: '/login',
controller: 'LoginCtrl',
templateUrl: 'app/components/authentication/template/login.html',
data: {
title: 'Login'
}
})
.state('app.user', {
url: '/user',
controller: 'userCtrl',
templateUrl: 'app/components/user/template/user.html',
data: {
title: 'user',
authorizedRoles: [USER_ROLES.admin , USER_ROLES.user],
}
})
.state('app.startUp', {
url: '/startUp',
controller: 'userCtrl',
templateUrl: 'app/components/user/template/startUp.html',
data: {
title: 'user',
authorizedRoles: [USER_ROLES.admin , USER_ROLES.user],
}
})
})
})();