-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add example for pre ivy #28
Comments
Hey @siddharthpal, You can use this library with Angular 7. Use the schamatics to generate the modules. Check the home page for the schematics import { LoadableModule, matcher } from 'ngx-loadable';
...
LoadableModule.forFeature({
moduleConfigs: [{
name: 'lazy',
loadChildren: () => import("./lazy/lazy.module").then(mod=> mod.LazyModule),
matcher
}]), so if dynamic import doesn't work in your application, you can use magic string instead import { LoadableModule, matcher } from 'ngx-loadable';
...
LoadableModule.forFeature({
moduleConfigs: [{
name: 'lazy',
loadChildren: './lazy/lazy.module#LazyModule',
matcher
}]), |
Please feel free to add this information in the FAQ section |
Thanks, @mohammedzamakhan will try with magic strings and let you know. |
Hi @mohammedzamakhan I tried the way you have mentioned above. I am facing one issue: And I see many warnings whenever I serve the app Sample application for repro. Brief about the appI am here using a Nrwl repo. I am lazily loading a module by setting the path in angular.json. When I build the app with aot I see a lazy load chunk is created. In app.module I have added ngx-loadable and using it as below
Is there anything I am doing wrong or misconfiguring? Thanks! |
Hi @mohammedzamakhan
Thanks for such a cool library. angular/core used in the demo app is for the Ivy engine. Can we add an example for pre-Ivy compiler which would work with Angular 7? If there isn't any repo I can create it and try ngx-loadable with Angular 7.
Please let me know if there is any change in using ngx-loadble for view engine?
The text was updated successfully, but these errors were encountered: