Skip to content

feat(blueprints): adding generation of routing config #342

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

Merged
merged 1 commit into from
Mar 24, 2016
Merged

feat(blueprints): adding generation of routing config #342

merged 1 commit into from
Mar 24, 2016

Conversation

zackarychapple
Copy link
Contributor

feat(blueprints): adding generation of routing config

adding automatic routing generation by default with option to not generate for application via skip-router-generation
closes #287, closes #292

@zackarychapple zackarychapple added the feature Issue that requests a new feature label Mar 23, 2016
.join('\n');

routeDefinitions = ngCliConfig.routes.map(route =>
`{path:'${route.routePath}', name: '${route.component}', component: ${route.component}},`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should be support for useAsDefault (but it's probably not directly related to this PR).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing whitespace after path:.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a fair argument towards useAsDefault being necessary for this PR: without it being supported by code generation, there is no way for a user to do it himself for these managed routes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gkalpak I will do the useAsDefault as part of another commit because I want to properly wrap it with tests.

@filipesilva
Copy link
Contributor

This looks pretty good to me, great job @zackarychapple ! Tests are quite thorough, which was important with the config based code gen, so well done.

Regarding the useAsDefault... It will require good testing yeah. Meanwhile I'd say people can just create a route with --skip-router-generation and then add the route with whatever flags they need manually.

@zackarychapple zackarychapple merged commit e32fd1c into angular:master Mar 24, 2016
@zackarychapple zackarychapple deleted the cli-generated-route branch March 24, 2016 16:27
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Issue that requests a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ng g route should also add the route to the RouteConfig
3 participants