0

I am trying to load oclazyload by injecting oc.lazyload module dependency in below code:

define([
    'angular',
    'ui-bootstrap',
    'ocLazyLoad'], function initModule(angular) {
    'use strict';
angular.module('myModule', [
        'oc.lazyLoad'
]);
});

Now if i am using the above component in another module where oc.lazyload module is already being loaded, i get an error on console-

No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.

I guess this error is occurring because oc.lazyload module dependency is being injected twice. Has someone faced any such error while developments with webpack. Please help.

jass
  • 343
  • 3
  • 15
  • How are you referencing the module? Bower, requirejs, ect? Notice in this example how it uses the import ... I'm assuming you have something like that but are just not showing it? https://github.com/lookfirst/systemjs-seed/blob/master/src/app/app.js – imaCoden Sep 21 '17 at 19:26
  • @losSteveos I am loading dependencies using require – jass Sep 22 '17 at 02:22

0 Answers0