/
app.js
35 lines (35 loc) · 883 Bytes
/
app.js
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
angular
.module('app', [
'ui.router',
'ui.materialize'
])
.config(['$urlRouterProvider', '$stateProvider', function($urlRouterProvider, $stateProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider
.state('home', {
url: '/',
templateUrl: 'home/home.html',
controller: 'homeCtrl'
})
.state('about', {
url:'/about',
templateUrl: 'about/about.html',
controller: 'aboutCtrl'
})
.state('user', {
url: '/user',
templateUrl: 'user/user.html',
controller: 'userCtrl'
})
.state('user.profile', {
url: '/profile',
templateUrl: 'user/profile.html',
controller: 'userCtrl'
})
.state('user.account', {
url: '/account',
templateUrl: 'user/account.html',
controller: 'userCtrl'
})
}
])