1
|
var dliApp = angular.module('dliApp', ['ngRoute']);
|
2
|
|
3
|
|
4
|
|
5
|
dliApp.config(function ($routeProvider) {
|
6
|
$routeProvider.
|
7
|
when('/', {
|
8
|
templateUrl: 'static/partials/index.html',
|
9
|
controller: 'mainPageController'
|
10
|
})
|
11
|
.when('/query/q=:q*', {
|
12
|
templateUrl: 'static/partials/query.html',
|
13
|
controller: 'queryController'
|
14
|
})
|
15
|
.when('/query/page=:page/q=:q*', {
|
16
|
templateUrl: 'static/partials/query.html',
|
17
|
controller: 'queryController'
|
18
|
})
|
19
|
.when('/query/:f/q=:q*', {
|
20
|
templateUrl: 'static/partials/query.html',
|
21
|
controller: 'queryController'
|
22
|
})
|
23
|
.when('/query/:f/page=:page/q=:q*', {
|
24
|
templateUrl: 'static/partials/query.html',
|
25
|
controller: 'queryController'
|
26
|
})
|
27
|
.when('/detail/:id*', {
|
28
|
templateUrl: 'static/partials/detail.html',
|
29
|
controller: 'detailController'
|
30
|
}).when('/datasources', {
|
31
|
templateUrl: 'static/partials/datasources.html',
|
32
|
controller: 'datasourcesController'
|
33
|
}).when('/datasource/id/:id', {
|
34
|
templateUrl: 'static/partials/datasourceDetail.html',
|
35
|
controller: 'datasourceDetailController'
|
36
|
}).when('/datasource/name/:name', {
|
37
|
templateUrl: 'static/partials/datasourceDetail.html',
|
38
|
controller: 'datasourceDetailController'
|
39
|
}).when('/api', {
|
40
|
templateUrl: 'static/partials/api.html',
|
41
|
controller: 'mainPageController'
|
42
|
}).when('/about', {
|
43
|
templateUrl: 'static/partials/about.html',
|
44
|
controller: 'mainPageController'
|
45
|
}).when('/contact', {
|
46
|
templateUrl: 'static/partials/contactus.html',
|
47
|
controller: 'mainPageController'
|
48
|
}).when('/statistics', {
|
49
|
templateUrl: 'static/partials/statistics.html',
|
50
|
controller: 'statsController'
|
51
|
})
|
52
|
|
53
|
|
54
|
.otherwise({
|
55
|
redirectTo: '/'
|
56
|
})
|
57
|
});
|