|
1 | 1 | Angular Material comes packaged with Angular CLI schematics to make
|
2 | 2 | creating Material applications easier.
|
3 | 3 |
|
4 |
| -## Install Schematics |
5 |
| -Schematics come packaged with Angular Material, so once you have |
6 |
| -installed the npm package, they will be available via the Angular CLI. |
| 4 | +### Install Schematics |
| 5 | +Schematics are included with both `@angular/cdk` and `@angular/material`. Once you install the npm |
| 6 | +packages, they will be available through the Angular CLI. |
7 | 7 |
|
8 |
| -Using the command below will automatically install Angular Material for you |
9 |
| -and run the install schematic. |
| 8 | +Using the command below will install Angular Material, the [Component Dev Kit](https://material.angular.io/cdk) (CDK), |
| 9 | +and [Angular Animations](https://angular.io/guide/animations) in your project. Then it will run the |
| 10 | +install schematic. |
10 | 11 |
|
11 | 12 | ```
|
12 | 13 | ng add @angular/material
|
13 | 14 | ```
|
14 | 15 |
|
15 |
| -The install schematic will help you to quickly add Material to a new project. |
| 16 | +The install schematic will help you add Material to a new project. |
16 | 17 | This schematic will:
|
17 | 18 |
|
18 |
| -- Ensure project dependencies are placed in `package.json` |
19 |
| -- Ensure project dependencies are placed in your app module |
20 |
| -- Add Prebuilt or Setup Custom Theme |
| 19 | +- Ensure [project dependencies](./getting-started#step-1-install-angular-material-angular-cdk-and-angular-animations) are placed in `package.json` |
| 20 | +- Enable the [BrowserAnimationsModule](./getting-started#step-2-configure-animations) your app module |
| 21 | +- Add either a [prebuilt theme](./theming#using-a-pre-built-theme) or a [custom theme](./theming#defining-a-custom-theme) |
21 | 22 | - Add Roboto fonts to your index.html
|
22 |
| -- Apply simple CSS reset to body |
23 |
| -- Install and load `hammerjs` for gestures in your project. |
| 23 | +- Add the [Material Icon font](./getting-started#step-6-optional-add-material-icons) to your index.html |
| 24 | +- Add global styles to |
| 25 | + - Remove margins from `body` |
| 26 | + - Set `height: 100%` on `html` and `body` |
| 27 | + - Make Roboto the default font of your app |
| 28 | +- Install and import `hammerjs` for [touch gesture support](./getting-started#step-5-gesture-support) in your project |
24 | 29 |
|
25 | 30 | ## Generator Schematics
|
26 | 31 | In addition to the install schematic, Angular Material has three schematics it comes packaged with:
|
|
0 commit comments