-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrouter.js
More file actions
35 lines (31 loc) · 988 Bytes
/
router.js
File metadata and controls
35 lines (31 loc) · 988 Bytes
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
/**
* Created by hygkui on 15/10/2.
*/
App.config(function ($stateProvider, $urlRouterProvider) {
// Ionic uses AngularUI Router which uses the concept of states
// Learn more here: https://github.com/angular-ui/ui-router
// Set up the various states which the app can be in.
// Each state's controller can be found in controllers.js
$stateProvider
// setup an abstract state for the tabs directive
.state('/', {
url: '/',
abstract: true,
templateUrl: 'index.html'
})
.state('notice', {
url: '/notice',
templateUrl: 'templates/notice.tpl.html'
})
.state('score', {
url: '/score',
templateUrl: 'templates/score.tpl.html'
})
.state('profile', {
url: '/me',
templateUrl: 'templates/profile.tpl.html'
})
;
// if none of the above states are matched, use this as the fallback
$urlRouterProvider.otherwise('/notice');
});