Skip to content

Commit 236fadd

Browse files
committed
docs: update documentation on creating a custom material module
1 parent 3ae6eb2 commit 236fadd

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

guides/getting-started.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,13 @@ import {MatButtonModule, MatCheckboxModule} from '@angular/material';
8282
export class PizzaPartyAppModule { }
8383
```
8484

85-
Alternatively, you can create a separate NgModule that imports all of the
86-
Angular Material components that you will use in your application. You can then
87-
include this module wherever you'd like to use the components.
85+
Alternatively, you can create a separate NgModule that imports and then re-exports all of the Anguar Material components that you will use in your application. By exporting them again, other modules can simply include your `CustomMaterialModule` wherever Material components are needed, and automatically get all of the exported Material modules. A good place for importing/exporting the application-wide Material modules is the [SharedModule](https://angular.io/guide/ngmodule-faq#sharedmodule).
8886

8987
```ts
9088
import {MatButtonModule, MatCheckboxModule} from '@angular/material';
9189

9290
@NgModule({
93-
imports: [MatButtonModule, MatCheckboxModule],
94-
exports: [MatButtonModule, MatCheckboxModule],
91+
exports: [MatButtonModule, MatCheckboxModule]
9592
})
9693
export class MyOwnCustomMaterialModule { }
9794
```

0 commit comments

Comments
 (0)