-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
executable file
·44 lines (37 loc) · 930 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const _MODULE = 'wmi';
(function() {
'use strict';
// app initialize
angular
.module(_MODULE, [
'ngRoute', // lets us have inner views
'ngAnimate', // lets us use built-in animations
'ngSanitize', // lets us use ng-bind-html in templates to render HTML
'ui.bootstrap' // lets us have access to angular ui bootstrap directives
]);
// app constants
angular
.module(_MODULE)
.constant('CONFIG', {
apiBaseUrl : 'json/test.json'
});
// app routing
angular
.module(_MODULE)
.config(routerConfig);
routerConfig.$inject = [
'$routeProvider',
'$locationProvider'
];
function routerConfig($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl : 'views/main.html',
controller : 'MainCtrl',
controllerAs : 'vm'
})
.otherwise({
redirectTo : '/'
});
}
})();