This repository has been archived by the owner on Feb 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
app.js
52 lines (50 loc) · 1.45 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//defines the AngularJS app as a module
angular
.module('westerosiApp', [
'ui.router',
'ngTagsInput',
'ngMessages' //'ngAnimate'
])
//ui-router config
.config([
'$stateProvider',
'$urlRouterProvider',
function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/about');
$stateProvider
.state('about', {
url: '/about',
template: require('../partials/about.html')
})
.state('houses', {
url: '/houses',
template: require('../partials/houseList.html'),
controller: 'HouseListCtrl'
})
.state('newHouse', {
url: '/newHouse',
template: require('../partials/house.html'),
controller: 'NewHouseCtrl'
})
.state('houses.item', {
url: '/:item',
template: require('../partials/house.html'),
controller: 'OneHouseCtrl'
})
.state('characters', {
url: '/characters',
template: require('../partials/characterList.html'),
controller: 'CharacterListCtrl'
})
.state('newCharacter', {
url: '/newCharacter',
template: require('../partials/character.html'),
controller: 'NewCharacterCtrl'
})
.state('characters.item', {
url: '/:item',
template: require('../partials/character.html'),
controller: 'OneCharacterCtrl'
});
}
]);