-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
42 lines (39 loc) · 1.29 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
var App = angular.module('phonecatApp', [
'ngRoute',
'phonecatAnimations',
'phonecatControllers',
'phonecatFilters',
'phonecatServices'
]);
var AppControllers = angular.module('phonecatControllers', []);
var AppFilters = angular.module('phonecatFilters', []);
var AppServices = angular.module('phonecatServices', ['ngResource']);
var AppAnimations = angular.module('phonecatAnimations', ['ngAnimate']);
App.config([
'$routeProvider', '$locationProvider' ,function($routeProvide, $locationProvider){
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
$routeProvide
.when('/', {
templateUrl: 'templates/index.html',
controller: 'PhonesCtrl'
})
.when('/about', {
templateUrl: 'templates/about.html',
controller: 'AboutCtrl'
})
.when('/contacts', {
templateUrl: 'templates/contacts.html',
controller: 'ContactsCtrl'
})
.when('/phones/:id', {
templateUrl: 'templates/phone-detail.html',
controller: 'PhoneDetailCtrl'
})
.otherwise({
redirectTo: '/'
});
}
]);