-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
41 lines (37 loc) · 1.02 KB
/
index.html
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
<div oc-lazy-load="{name: 'HeaderModule', files: ['js/HeaderModule.js']}">
<header my-header headerName="abc">
<p>header name: {{headerName}}</p>
<p>header value: {{headerValue}}</p>
</header>
</div>
<div ng-controller="ContentController">
Name: <input ng-model="name">
<p>Hello {{name}}</p>
</div>
<div oc-lazy-load="{name: 'FooterModule', files: ['js/FooterModule.js']}">
<footer>
<header my-header footerName="abc">
<p>footer name: {{footerName}}</p>
<p>footer value: {{footerValue}}</p>
</header>
</div>
</footer>
<div>
<script src="bower_components/requirejs/require.js"></script>
<script>
require.config({
paths: {
angular: 'bower_components/angular/angular',
ocLazyLoad: 'bower_components/oclazyload/dist/ocLazyLoad'
},
shim: {
ocLazyLoad: ['angular']
}
})
require(['angular', 'ocLazyLoad'], function() {
var app = angular.module('app', ['oc.lazyLoad'])
app.controller('ContentController', ['$scope', function($scope) {
}])
angular.bootstrap(document.body, ['app'])
})
</script>