Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rahulgupta20nov opened this issue Feb 16, 2018 · 2 comments

Comments

@rahulgupta20nov
Copy link

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.

@jfmoy
Copy link

jfmoy commented Mar 6, 2018

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.

@rahulgupta20nov
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants