Skip to content

Commit b391ef8

Browse files
committed
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 b391ef8

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 module, you can use the `--routing` option like `ng g module my-module --routing` to create a separate file `my-module-routing.module.ts` to store the module routes.
124+
125+
The file includes an empty `Routes` object that you can fill with routes to different components and/or modules.
126+
127+
The `--routing` option also generates a default component with the same name as the module.
128+
129+
- You can use the `--routing` option with `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)