-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
45 lines (34 loc) · 778 Bytes
/
app.js
File metadata and controls
45 lines (34 loc) · 778 Bytes
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
var app = angular.module("AppModule", ['ui.router']);
app.factory("MySimpleService", function() {
return {
name : 'test'
};
});
app.config(function($stateProvider, $urlRouterProvider) {
var homeState = {
name: 'home',
url: '/',
templateUrl: 'templs/home.html',
};
var aboutState = {
name: 'about',
url: '/about',
templateUrl: 'templs/about.html',
};
var carState = {
name: 'cars',
url: '/cars',
templateUrl: 'templs/cars.html',
};
var pokeState = {
name: 'poke',
url: '/poke',
templateUrl: 'templs/poke.html',
};
$stateProvider.state(homeState);
$stateProvider.state(aboutState);
$stateProvider.state(carState);
$stateProvider.state(pokeState);
//default routing
$urlRouterProvider.otherwise('/');
});