-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
28 lines (25 loc) · 844 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
//Initialising angular app
var garage = angular.module('garage', ['ui.router']);
//Route setting
garage.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider
.state('/', {
url: '/',
views: {
'': {
controller: 'garageCtrl',
templateUrl: 'views/garage.html'
},
'filter' : {
controller: 'filterCtrl',
templateUrl: 'views/filter.html'
}
}
})
.state('vehicle', {
url: '/vehicle/:vehicleId?',
controller: 'vehicleCtrl',
templateUrl: 'views/vehicle.html'
});
});