Search code examples
angularjsoclazyload

Facing issue -oclazyload?


In html:

<script
    src="https://cdnjs.cloudflare.com/ajax/libs/oclazyload/1.1.0/modules/ocLazyLoad.core.js"></script>

In config.js:

.state('contact', {
        url : '/contact',
        templateUrl : './contact.html',
        resolve : {
            loadPlugin : function($ocLazyLoad) {
                return $ocLazyLoad
                .load(["./contact.js"
                       ])}}

    });

Module:

var IPApp=angular.module('IPApp',['ngResource','ui.router','ui.bootstrap','angular-loading-bar','oc.lazyLoad']);

Am I missing out something ,anywhere? Facing issue while tring to load the controller via oclazyload?

Issue: enter image description here

Help me to solve this problem.. Thanks.


Solution

  • download oclazyload from github and go to dist and add oclazyload.js instead cdn file