我从 angular、express 和 node js 开始,我正在尝试使用 oc-lazy-load 指令在 html 页面中加载 2 个指令。
我这样做:https ://oclazyload.readme.io/docs/olazyload-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>
但它总是加载最后一个指令。因此,如果我删除页脚,它将加载页眉指令。如果我删除页眉,它将加载页脚...
一个提示?谢谢你!