ocombe / ocLazyLoad

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

Incompatible with angular-webpack-plugin #190

Open tlrobinson opened 9 years ago

tlrobinson commented 9 years ago

I couldn't seem to get ocLazyLoad working with angular-webpack-plugin which essentially scans your modules for angular.module calls and treats them as "require" dependencies.

Replacing angular.module('oc.lazyLoad', []) with window.angular.module('oc.lazyLoad', []) (similar to https://github.com/teux/ng-cache-loader/commit/2efa293226dd68d61008cedba562737426ef6d7d) seems to work but I haven't tested it extensively, and I'm not sure if this is the best solution.

ocombe commented 9 years ago

Thanks, I haven't had the time to work on ocLazyLoad + webpack|systemjs, but I know that others have found ways to make it work. Maybe you could take a look at this: https://github.com/ay13/webpack-angular-oclazyload