-
Notifications
You must be signed in to change notification settings - Fork 12k
NG generate lazy loaded module #8717
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
Comments
This can be prototyped with custom schematics eg: |
@tomastrajan |
@mbeckenbach check out this talk from Angular Connect 😉 I am also interested in creating custom schematics but until something is done about this issue and this PR you would have to include original After the feature is merged it will be possible just to add your own schematics on top of default ones provided by Angular CLI just by adding your own collection in Cheers! |
They have made it fairly easy to do now, you can just do:
_ and add the route to your main router file/const |
Closing as indicated above. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Versions
Feature request
Usually all of our feature modules are lazy loaded.
So the developer has to run at least two commands to create a new module to get our default file layout.
ng g m Foo -- routing
ng g c Foo --flat
Then the developer has to add a default route to the new modules routing module as well as the lazy loading route definition to the nearest parent module.
As the syntax and relative paths are allways the same, wouldn't it be possible to add some flags to combine those stepts?
maybe like this:
ng g module Foo --routing --component --lazy
or even simpler
ng g feature Foo (--lazy)
The text was updated successfully, but these errors were encountered: