Skip to content

Commit f5ccd71

Browse files
authored
fix(docs): replace outdated routes note
This PR replaces the docs about routing in README, so that instead of suggesting it's not possible, it talks about the `--routes` generation instead.
1 parent 6d63bb4 commit f5ccd71

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,18 @@ Module | `ng g module my-module`
116116

117117
### Generating a route
118118

119-
Generating routes in the CLI has been disabled for the time being. A new router and new route generation blueprints are coming.
119+
The CLI supports routing in several ways:
120+
121+
- We include the `@angular/router` NPM package when creating or initializing a project.
122+
123+
- When you generate a route, we provide a `--routing` option to create a placeholder route configuration file, which can be called like `ng g module my-module --routing`.
124+
125+
This creates a `my-module-routing.module.ts` file, with a `routes` object you can use to add routes to different components.
126+
127+
It also generates a default component with the same name as the module.
128+
129+
- You can use the `--routing` option to `ng new` or `ng init` to create a `app-routing.module.ts` file when you create or initialize a project.
120130

121-
You can read the official documentation for the new Router here: https://angular.io/docs/ts/latest/guide/router.html. Please note that even though route generation is disabled, building your projects with routing is still fully supported.
122131

123132
### Creating a build
124133

0 commit comments

Comments
 (0)