我从angular,express和node js开始,并尝试使用oc-lazy-load指令在html页面中加载2个指令。
我这样做:https://oclazyload.readme.io/docs/oclazyload-directive
<!DOCTYPE html>
<html lang="fr" ng-app="app">
<head>
<meta charset="UTF-8">
<title>Angular,MongoDB,Express,NodeJS</title>
</head>
<body>
<!-- Header placed here and included by oclazyload and header directive -->
<div oc-lazy-load="['./modules/headfoot/directives/header.js']">
<appheader></appheader>
</div>
<main>
<!-- All modules views will be placed here and included by ui-view directive -->
<div ui-view></div>
</main>
<!-- Footer placed here and included by oclazyload and footer directive -->
<div oc-lazy-load="['./modules/headfoot/directives/footer.js']">
<appfooter></appfooter>
</div>
<!-- LOAD FILES -->
<!-- angular -->
<script src="./angular/angular.min.js"></script>
<!-- ocLazyLoad -->
<script src="./oclazyload/dist/ocLazyLoad.min.js"></script>
<!-- ui-router -->
<script src="./angular-ui-router/release/angular-ui-router.min.js"></script>
<!-- app routes -->
<script src="./modules/routes.js"></script>
</body>
</html>
但它总是加载最后一个指令。 因此,如果我删除页脚,它将加载标头指令。 如果我删除标题,它将加载页脚...
提示?谢谢!