apollodec/Apollo/bower_components/oclazyload/examples/simpleExample/index.html
venbatechnologies@gmail.com d06b1c0cba status file
2017-12-07 11:31:25 +05:30

27 lines
887 B
HTML
Executable File

<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="https://code.jquery.com/jquery-1.11.2.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.7/angular.js"></script>
<script src="../../src/ocLazyLoad.js"></script>
</head>
<body>
<div id="example" ng-app="LazyLoadTest" ng-controller="TestController">
</div>
<script>
angular.module("LazyLoadTest", ["oc.lazyLoad"])
.controller("TestController", function($scope, $ocLazyLoad, $compile) {
$ocLazyLoad.load("js/testApp.js").then(function() {
var el, elToAppend;
elToAppend = $compile('<say-hello to="world"></say-hello>')($scope);
el = angular.element('#example');
el.append(elToAppend);
}, function(e) {
console.log(e);
})
});
</script>
</body>
</html>