-
-
Notifications
You must be signed in to change notification settings - Fork 22
feat: flag to skip adding auto-generated component on ng new and ng add
#171
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
feat: flag to skip adding auto-generated component on ng new and ng add
#171
Conversation
sis0k0
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, Danny! Great work!
I've suggested stylistic changes in some files.
One note about the implementation:
We need to modify the routing module for {N} when the auto-generated component is skipped. We have to make sure that the import and the route are ommited.
Co-Authored-By: d-koppenhagen <mail@d-koppenhagen.de>
…ratedComponent flag has been raised
sis0k0
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good! But, there's another problem that I didn't think of initially - the default route redirects to auto-generated, but there's no such route if skipAutoGeneratedComponent is passed.
Actually, there's no component to navigate to.
We should probably leave the routes array empty and replace the page-router-outlet from the AppComponent with a placeholder.
…Component is set or not
|
Hi @sis0k0 that was a good point. I added some conditional checks now. |
ng new and ng add
|
test |
ng new and ng addng new and ng add
|
Great work! This feature will be included in the next version of |
fixes #166