forked from wenzhixin/travels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
34 lines (31 loc) · 829 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
'use strict';
var app = angular.module('app', [
'ngRoute',
'ngSanitize',
'controllers',
'services',
'filters',
'directives'
]).value('$anchorScroll', angular.noop);
app.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/', {
templateUrl: 'partials/list.html',
controller: 'ListCtrl',
state: 'list'
}).
when('/:index', {
templateUrl: 'partials/detail.html',
controller: 'DetailCtrl',
state: 'detail'
}).
otherwise({
redirectTo: '/'
});
}]);
app.run(['$rootScope', 'Scene', '$window',
function($rootScope, Scene, $window) {
$rootScope.senes = Scene.query();
}
]);