ngtemplate-loader icon indicating copy to clipboard operation
ngtemplate-loader copied to clipboard

Directive templateurl is not working with lazyloading module in ui-router.

Open rahulgupta20nov opened this issue 7 years ago • 2 comments

Hi, I am using oclayload for load module lazily, and make split chunks using web pack. Some directive depends on lazily load the module when any state invoke, In directive have templatedUrl these are not registered lazily and showing 404 not found file.html.

rahulgupta20nov avatar Feb 16 '18 09:02 rahulgupta20nov

If you want to load modules lazily, you can do it by removing ngtemplate-loader, and using html-loader directly for processing your html templates. Your templates should then be passed to your directives/states using the template property after a standard import.

jfmoy avatar Mar 06 '18 15:03 jfmoy

Thanks, @jfmoy , In that case, HTML files will be rendered from a server, I want to avoid this situation. https://www.npmjs.com/package/gulp-angular-templatecache, This Gulp plugin is working fine with the Lazy load. But I am not able to use both (Webpack and Gulp template cache plugin). I want a solution like this.

rahulgupta20nov avatar Mar 07 '18 05:03 rahulgupta20nov