質問編集履歴
1
app.jsを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -87,3 +87,69 @@
|
|
87
87
|
})
|
88
88
|
|
89
89
|
```
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
app.js
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
```lang-javascript
|
98
|
+
|
99
|
+
1 angular
|
100
|
+
|
101
|
+
2 .module('app', [
|
102
|
+
|
103
|
+
3 'ui.router'
|
104
|
+
|
105
|
+
4 ])
|
106
|
+
|
107
|
+
5 .config(['$stateProvider', '$urlRouterProvider', function($stateProvider,
|
108
|
+
|
109
|
+
6 $urlRouterProvider) {
|
110
|
+
|
111
|
+
7 $stateProvider
|
112
|
+
|
113
|
+
8 .state('home', {
|
114
|
+
|
115
|
+
9 url: '/',
|
116
|
+
|
117
|
+
10 templateUrl: 'views/home.html'
|
118
|
+
|
119
|
+
11 })
|
120
|
+
|
121
|
+
12 .state('search', {
|
122
|
+
|
123
|
+
13 url: '/search',
|
124
|
+
|
125
|
+
14 templateUrl: 'views/search.html',
|
126
|
+
|
127
|
+
15 controller: 'SearchController'
|
128
|
+
|
129
|
+
16 })
|
130
|
+
|
131
|
+
17 .state('ranking', {
|
132
|
+
|
133
|
+
18 url: '/ranking',
|
134
|
+
|
135
|
+
19 templateUrl: 'views/ranking.html',
|
136
|
+
|
137
|
+
20 controller: 'RankingController'
|
138
|
+
|
139
|
+
21 })
|
140
|
+
|
141
|
+
22 .state('inquery', {
|
142
|
+
|
143
|
+
23 url: '/inquery',
|
144
|
+
|
145
|
+
24 templateUrl: 'views/inquery.html',
|
146
|
+
|
147
|
+
25 });
|
148
|
+
|
149
|
+
26
|
150
|
+
|
151
|
+
27 $urlRouterProvider.otherwise('home');
|
152
|
+
|
153
|
+
28 }]);
|
154
|
+
|
155
|
+
```
|