ocombe / ocLazyLoad

Lazy load modules & components in AngularJS
https://oclazyload.readme.io
MIT License
2.63k stars 510 forks source link

Unable to load at HTMLScriptElement.el.onerror #359

Open lrishiraj007 opened 7 years ago

lrishiraj007 commented 7 years ago

I am facing the same issues with loading the module with ocLazyLoad.js

This is my config in routing ,

 $ocLazyLoadProvider.config({
            'debug': true, // For debugging 'true/false'
            'events': true, // For Event 'true/false'
            'modules': [{ // Set modules initially
                name : 'reportModule', // State1 module
                files: ['src/app/reportModule/controllers/reportModule.js','src/app/reportModule/models/reportModuleService.js']
            }]
        });

  $stateProvider.state('reportModule', {
            url: '/reportmodule',
            views: {
                "main": {
                    controller: 'ReportModuleController',
                    templateUrl: 'reportModule/views/reportModule.tpl.html'
                }
            },
            resolve: {
                loadMyCtrl: ['$ocLazyLoad', function($ocLazyLoad) {
                    return $ocLazyLoad.load('reportModule'); // Resolve promise and load before view
                }]
            },
            data: {
                pageTitle: 'Report'
            }
        });

and I'm getting error Something Like that, 82fcb0d2-95f2-11e6-920f-3541a99b12f9

Other than that i want to tell you that my projects loads all the modules with grunt's tasks So how does that affect ondemand loading .? Can you Please help me ?

Regards.

rewello commented 7 years ago

I am also facing the same issue have you find any solution

lrishiraj007 commented 7 years ago

Yes i have found solution, Everything was up to mark ,just there was configuration missing in my grunt file which is related to my project. Apprently You have to copy it from your source to compilr folder through grunt that was my issue. Anyways thanks for responding.

Regards. Rishi.

On Nov 14, 2016 8:34 PM, "rewello" notifications@github.com wrote:

I am also facing the same issue have you find any solution

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ocombe/ocLazyLoad/issues/359#issuecomment-260358350, or mute the thread https://github.com/notifications/unsubscribe-auth/ANby7USX7dsv2Mvbqt-1EPIByjznqxSeks5q-HhugaJpZM4Kf9qA .

rewello commented 7 years ago

Ah!! thank you so much buddy I have wasted hours over this but may I know how did you find the solution

Thanks, Kaushik