generator-angular-fullstack icon indicating copy to clipboard operation
generator-angular-fullstack copied to clipboard

Is it possible to use ocLazyLoad ?

Open ajai-jayakumar opened this issue 8 years ago • 1 comments

  • [x] I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests.
Item Version
generator-angular-fullstack 4.1.1
Node 6.10.0
npm 3.10.10
Operating System Ubuntu 14.01
Item Answer
Transpiler Babel
Markup HTML
CSS SCSS
Router ui-router
DB MongoDB
Auth Y

Hi, Instead of bundling the entire project into a single app.bundle.js I wanted to load files based on routes, say admin files should load when I am in admin route, homepage files when in homepage route and so on. When I searched I found ocLazyLoad can this be integrated with this generator or any other in-build functions are available in the generator itself .

ajai-jayakumar avatar Jun 23 '17 06:06 ajai-jayakumar

Yes, you can. You would need to use ocLazyLoad along with Webpack's code-splitting to create separate bundles that Angular can then lazily load.

Awk34 avatar Jun 29 '17 16:06 Awk34