-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
47 lines (34 loc) · 819 Bytes
/
app.js
File metadata and controls
47 lines (34 loc) · 819 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
46
47
var app = angular.module("PokeModule", ['ui.router']);
app.factory("MySimpleService", function() {
return {
name : 'testy'
};
});
app.config(function($stateProvider, $urlRouterProvider) {
var homeState = {
name: 'home',
url: '/',
templateUrl: 'templates/home.html',
};
var createState = {
name: 'create',
url: '/create',
templateUrl: 'templates/create.html',
};
var resultState = {
name: 'result',
url: '/result',
templateUrl: 'templates/result.html',
};
var fightState = {
name: 'fight',
url: '/fight',
templateUrl: 'templates/fight.html',
};
$stateProvider.state(homeState);
$stateProvider.state(createState);
$stateProvider.state(resultState);
$stateProvider.state(fightState);
//default routing
$urlRouterProvider.otherwise('/');
});