@@ -3,17 +3,17 @@ For help getting started with a new Angular app, check out the
3
3
4
4
For existing apps, follow these steps to begin using Angular Material.
5
5
6
- ### Step 1: Install Angular Material and Angular CDK
6
+ ### Step 1: Install Angular Material, Angular CDK and Angular Animations
7
7
8
8
You can use either the npm or yarn command-line tool to install packages. Use whichever is appropriate for your project in the examples below.
9
9
10
10
#### NPM
11
11
``` bash
12
- npm install --save @angular/material @angular/cdk
12
+ npm install --save @angular/material @angular/cdk @angular/animations
13
13
```
14
14
#### Yarn
15
15
``` bash
16
- yarn add @angular/material @angular/cdk
16
+ yarn add @angular/material @angular/cdk @angular/animations
17
17
```
18
18
19
19
@@ -24,29 +24,17 @@ build should not be considered stable and may break between releases.
24
24
25
25
#### NPM
26
26
``` bash
27
- npm install --save angular/material2-builds angular/cdk-builds
27
+ npm install --save angular/material2-builds angular/cdk-builds angular/animations-builds
28
28
```
29
29
30
30
#### Yarn
31
31
``` bash
32
- yarn add angular/material2-builds angular/cdk-builds
32
+ yarn add angular/material2-builds angular/cdk-builds angular/animations-builds
33
33
```
34
34
35
- ### Step 2: Animations
35
+ ### Step 2: Configure animations
36
36
37
- Some Material components depend on the Angular animations module in order to be able to do
38
- more advanced transitions. If you want these animations to work in your app, you have to
39
- install the ` @angular/animations ` module and include the ` BrowserAnimationsModule ` in your app.
40
-
41
- #### NPM
42
- ``` bash
43
- npm install --save @angular/animations
44
- ```
45
-
46
- #### Yarn
47
- ``` bash
48
- yarn add @angular/animations
49
- ```
37
+ Once the animations package is installed, import ` BrowserAnimationsModule ` into your application to enable animations support.
50
38
51
39
``` ts
52
40
import {BrowserAnimationsModule } from ' @angular/platform-browser/animations' ;
@@ -59,7 +47,7 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
59
47
export class PizzaPartyAppModule { }
60
48
```
61
49
62
- If you don't want to add another dependency to your project , you can use the ` NoopAnimationsModule ` .
50
+ Alternatively , you can disable animations by importing ` NoopAnimationsModule ` .
63
51
64
52
``` ts
65
53
import {NoopAnimationsModule } from ' @angular/platform-browser/animations' ;
0 commit comments