mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs: clarify docs on creating a custom material module (#15229)
This commit is contained in:
committed by
Jeremy Elbourn
parent
fe2881de7d
commit
5d3f5157ca
@@ -82,9 +82,7 @@ import {MatButtonModule, MatCheckboxModule} from '@angular/material';
|
||||
export class PizzaPartyAppModule { }
|
||||
```
|
||||
|
||||
Alternatively, you can create a separate NgModule that imports all of the
|
||||
Angular Material components that you will use in your application. You can then
|
||||
include this module wherever you'd like to use the components.
|
||||
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).
|
||||
|
||||
```ts
|
||||
import {MatButtonModule, MatCheckboxModule} from '@angular/material';
|
||||
|
||||
Reference in New Issue
Block a user