angular-toolkit
angular-toolkit copied to clipboard
[request] CLI register page module to current router
I think ionic g pg
command should page module to current router.
Now, all page module registered to src/app/app-routing.module.ts
.
For example:
in tabs template, $ ionic g pg tab1/sample
register SamplePageModule
to src/app/app-routing.module.ts
. I expect register to src/tab1/tab1.module.ts
. generate pipe
works like this.
Thanks.
@mhartington Thoughts?
I'd like to avoid magic resolution like this. Maybe a flag to pass the router-module you'd like to use?
ionic g page shop/user-card --router-module src/pages/shop-router.module.ts
I do not think this will ever be perfect, as once tabs are used, the structure could be really unpredictable. I wonder if keeping it as it is, is the safest option, and let users move the router if they want to. Or maybe an flag to disable the router from being added to a router-module?
@mhartington @dwieeb Thanks for reply. I understood.
Maybe a flag to pass the router-module you'd like to use?
I think to pass the router-module
is difficult for user. It is easier to understand focus on app-routing.module.ts
.
flag to disable the router
is very good!! If use modal-page, this flag is very useful!!
@mhartington @dwieeb This flug is --page-only
or else?
And I want to get --no-module
flag. If use this flag, don't create module, and link page to src/app/app-routing.module.ts
.
flag | create module | link module and router |
---|---|---|
(none) | ◯ | Lazy Loading |
--page-only | ☓ | ☓ |
--no-module | ☓ | Normal Loading |
I think try to implement this. What do you think?
@mhartington @dwieeb What do you think? Can I make a start in??