Skip to content

Commit bf88525

Browse files
authored
Update route.md
1 parent 51bb0b7 commit bf88525

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

Diff for: docs/content/generators/route.md

+2-12
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,15 @@ Generates a new route.
99
Example:
1010
```bash
1111
yo angular-fullstack:route myroute
12-
[?] What module name would you like to use? myApp.myroute
1312
[?] Where would you like to create this route? client/app/
1413
[?] What will the url of your route be? /myroute
1514
```
1615

1716
Produces:
1817

19-
client/app/myroute/myroute.js
2018
client/app/myroute/myroute.component.js
2119
client/app/myroute/myroute.component.spec.js
2220
client/app/myroute/myroute.html
23-
client/app/myroute/myroute.scss
21+
client/app/myroute/myroute.module.js
2422

25-
Your new `myroute.component.js` will contain Angular code registering a new module, defaulting to `myApp.myRoute`. The default export of the component will be this name. Make sure to import this name in a parent Angular module, and add it as a dependency like so:
26-
27-
```js
28-
import MyRouteModule from './myroute/myroute.component';
29-
30-
...
31-
32-
angular.module('myApp.myParent', [MyRouteModule]);
33-
```
23+
The generator will also add the new route's `NgModule` to the imports of your main `AppModule`. You may want to move this import to a sub-module.

0 commit comments

Comments
 (0)