Skip to content

Commit b2d3252

Browse files
elmeerrfilipesilva
authored andcommitted
docs: add module auto-import note
Change in a update version of README to create a new PR (as suggest by Brocco) Close #5470
1 parent f1f04bb commit b2d3252

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ Scaffold | Usage
9393
[Module](https://github.com/angular/angular-cli/wiki/generate-module) | `ng g module my-module`
9494

9595

96+
97+
98+
angular-cli will add reference to `components`, `directives` and `pipes` automatically in the `app.module.ts`. If you need to add this references to another custom module, follow this steps:
99+
100+
1. `ng g module new-module` to create a new module
101+
2. call `ng g component new-module/new-component`
102+
103+
This should add the new `component`, `directive` or `pipe` reference to the `new-module` you've created.
104+
96105
### Updating Angular CLI
97106

98107
If you're using Angular CLI `beta.28` or less, you need to uninstall `angular-cli` package. It should be done due to changing of package's name and scope from `angular-cli` to `@angular/cli`:

0 commit comments

Comments
 (0)