-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Add the ability to generate routes #64
Comments
How do you see the routes getting created? Where would they live? I think if there was just one route file this would be fairly easy, but if you go from a component or feature approach the route would maybe live in the related sub folder. The latter would make a route generator hard. I do agree that the starting should have some route examples though. |
hmm.. I was expecting a single, top-level routes file. I can see how projects may want to register their routes in a sub-folder, but it seems like that would be more of an advanced user case. For the casual user wanting to start a new Angular2 project, it would be nice if routing worked "right-out-of-the-box." |
My current thinking is that routes should really be routable components. These unlike regular components get generated in as a nested directory structure that maps to the route directory structure. |
I can pick this up soon. |
@filipesilva I am happy to help out with this too. I'm still learning ng2 but this project is great - the ember-cli is super useful. |
@samjulien thanks! I think it's going to be easy enough, but adding routes will need these two PRs in as well #66 #100 @IgorMinar Routable components seems the way to go, like described here in angular.io. Maybe even doing the routable component + list component + detail component + service all at once. Thus, running
Would generate the following folder structure
And would add the child route definition to the router in
|
I've a PR proposal for route generation in #139. It does somewhat more than adding a single route. |
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. |
Consider generating the initial app integrated with component router.
Add the ability to generate new routes, with something like:
The text was updated successfully, but these errors were encountered: