File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -5,29 +5,49 @@ For existing apps, follow these steps to begin using Angular Material.
5
5
6
6
### Step 1: Install Angular Material and Angular CDK
7
7
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
+
10
+ #### NPM
8
11
``` bash
9
12
npm install --save @angular/material @angular/cdk
10
13
```
14
+ #### Yarn
15
+ ``` bash
16
+ yarn add @angular/material @angular/cdk
17
+ ```
18
+
11
19
12
20
#### Alternative: Snapshot Build
13
21
14
22
A snapshot build with the latest changes from master is also available. Note that this snapshot
15
23
build should not be considered stable and may break between releases.
16
24
25
+ #### NPM
17
26
``` bash
18
27
npm install --save angular/material2-builds angular/cdk-builds
19
28
```
20
29
30
+ #### Yarn
31
+ ``` bash
32
+ yarn add angular/material2-builds angular/cdk-builds
33
+ ```
34
+
21
35
### Step 2: Animations
22
36
23
37
Some Material components depend on the Angular animations module in order to be able to do
24
38
more advanced transitions. If you want these animations to work in your app, you have to
25
39
install the ` @angular/animations ` module and include the ` BrowserAnimationsModule ` in your app.
26
40
41
+ #### NPM
27
42
``` bash
28
43
npm install --save @angular/animations
29
44
```
30
45
46
+ #### Yarn
47
+ ``` bash
48
+ yarn install @angular/animations
49
+ ```
50
+
31
51
** Note:** ` @angular/animations ` uses the WebAnimation API that isn't supported by all browsers yet.
32
52
If you want to support Material component animations in these browsers, you'll have to
33
53
[ include a polyfill] ( https://github.com/web-animations/web-animations-js ) .
You can’t perform that action at this time.
0 commit comments