Skip to content

Commit 16a26f4

Browse files
committed
docs(gen:route): update for 4.x.x [skip ci]
1 parent 9894290 commit 16a26f4

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/generators/route.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@ yo angular-fullstack:route myroute
1212
Produces:
1313

1414
client/app/myroute/myroute.js
15-
client/app/myroute/myroute.controller.js
16-
client/app/myroute/myroute.controller.spec.js
15+
client/app/myroute/myroute.component.js
16+
client/app/myroute/myroute.component.spec.js
1717
client/app/myroute/myroute.html
1818
client/app/myroute/myroute.scss
19+
20+
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:
21+
22+
```js
23+
import myRouteComponent from './myroute/myroute.component';
24+
25+
...
26+
27+
angular.module('myApp.myParent', [myRouteComponent]);
28+
```

0 commit comments

Comments
 (0)