1

i'm starting with angular,express and node js and i'm trying to load 2 directives in an html page using the oc-lazy-load directive.

I'm doing like this: 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>

But it always load the last directive. So if i delete footer it will load the header directive. If i delete header, it will load footer...

A hint? thank you!

Ricardo Machado
  • 787
  • 1
  • 8
  • 16

0 Answers0