-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
35 lines (34 loc) · 922 Bytes
/
main.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
require.config({
urlArgs: "==version==",
waitSeconds: 0,
baseUrl: 'js/',
paths: {
'jquery': 'lib/jquery/dist/jquery',
'angular': 'lib/bower-angularjs/angular.min',
'angular-route': 'lib/bower-angularjs/angular-route.min',
'app': 'app',
'controller1': 'controller/controller1',
'controller2': 'controller/controller2',
'route': 'route/route'
},
shim: {
'angular': {
exports: 'angular'
},
'angular-route': {
deps: ['angular'],
exports: 'angular-route'
}
},
deps: ['app']
});
require(['jquery', 'angular', 'angular-route', 'app', 'controller1', 'controller2', 'route'], function ($, angular) {
$(function () {
console.log($);
console.log(angular);
angular.bootstrap(document, ["myApp"]); //初始化整app
// angular.bootstrap(document.getElementById('app-root'), ['myApp'], {
// debugInfoEnabled: true
// });
})
});