Skip to content
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

[request] CLI register page module to current router #119

Open
rdlabo opened this issue Apr 19, 2019 · 5 comments
Open

[request] CLI register page module to current router #119

rdlabo opened this issue Apr 19, 2019 · 5 comments

Comments

@rdlabo
Copy link
Contributor

rdlabo commented Apr 19, 2019

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.

@rdlabo rdlabo changed the title [request] CLI register page to current module [request] CLI register page module to current folder router Apr 19, 2019
@rdlabo rdlabo changed the title [request] CLI register page module to current folder router [request] CLI register page module to current router Apr 19, 2019
@imhoffd imhoffd transferred this issue from ionic-team/ionic-cli Apr 19, 2019
@imhoffd
Copy link
Contributor

imhoffd commented Apr 19, 2019

@mhartington Thoughts?

@mhartington
Copy link
Contributor

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?

@rdlabo
Copy link
Contributor Author

rdlabo commented Apr 22, 2019

@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!!

@rdlabo
Copy link
Contributor Author

rdlabo commented Apr 26, 2019

@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?

@rdlabo
Copy link
Contributor Author

rdlabo commented May 30, 2019

@mhartington @dwieeb What do you think? Can I make a start in??

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

No branches or pull requests

3 participants