Skip to content

Conversation

@d-koppenhagen
Copy link
Contributor

@d-koppenhagen d-koppenhagen commented Dec 13, 2018

fixes #166

Copy link
Contributor

@sis0k0 sis0k0 left a 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.

sis0k0 and others added 2 commits December 17, 2018 11:11
Co-Authored-By: d-koppenhagen <mail@d-koppenhagen.de>
Copy link
Contributor

@sis0k0 sis0k0 left a 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.

@d-koppenhagen
Copy link
Contributor Author

Hi @sis0k0 that was a good point. I added some conditional checks now.

@sis0k0 sis0k0 changed the title Adds flag for skip adding auto-generated component. fixes #166 feat: flag for skip adding auto-generated component on ng new and ng add Dec 20, 2018
@sis0k0
Copy link
Contributor

sis0k0 commented Dec 20, 2018

test

@sis0k0 sis0k0 changed the title feat: flag for skip adding auto-generated component on ng new and ng add feat: flag to skip adding auto-generated component on ng new and ng add Dec 20, 2018
@sis0k0
Copy link
Contributor

sis0k0 commented Dec 20, 2018

Great work! This feature will be included in the next version of @nativescript/schematics - v0.5.0 🎉

@sis0k0 sis0k0 merged commit 6c835b1 into NativeScript:master Dec 20, 2018
@d-koppenhagen d-koppenhagen deleted the skip-auto-generated branch December 28, 2018 10:21
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

Successfully merging this pull request may close these issues.

skip adding auto-generated component when adding schematics

2 participants