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
53
54
55
56
57
58
59
60
61
62
63
|
var mach2App = angular.module(
'mach2App',
[
'ui.router',
'mach2Services',
'mach2Controllers',
'mach2Filters',
'ui.bootstrap',
'angularMoment'
]
);
mach2App.config(
[
'$stateProvider',
'$urlRouterProvider',
function($stateProvider, $urlRouterProvider) {
$stateProvider.state('artists', {
url: '/artists',
templateUrl: 'static/partials/artists/list.html',
controller: 'ArtistCtrl',
});
$stateProvider.state('artistdetail', {
url: '/artists/{artistId:int}',
templateUrl: 'static/partials/artists/detail.html',
controller: 'ArtistDetailCtrl',
resolve: {
artistId: ['$stateParams', function($stateParams) {
return $stateParams.artistId;
}]
},
});
$stateProvider.state('artistdetail.tracks', {
url: '/tracks',
templateUrl: 'static/partials/artists/tracks.html',
controller: 'ArtistTracksCtrl'
});
$stateProvider.state('albums', {
url: '/albums',
templateUrl: 'static/partials/albums/list.html',
controller: 'AlbumCtrl'
});
$stateProvider.state('albums.detail', {
url: '/{albumId:int}',
templateUrl: 'static/partials/album/detail.html',
controller: 'AlbumDetailCtrl'
});
$urlRouterProvider.otherwise('/artists');
}
]
);
mach2App.constant(
'angularMomentConfig',
{
timezone: 'utc'
}
);
|