Skip to content

Commit a4d7d28

Browse files
doughlassjelbourn
authored andcommitted
docs(getting-started): include yarn snippets (#9137)
1 parent c616713 commit a4d7d28

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

guides/getting-started.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,49 @@ For existing apps, follow these steps to begin using Angular Material.
55

66
### Step 1: Install Angular Material and Angular CDK
77

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
811
```bash
912
npm install --save @angular/material @angular/cdk
1013
```
14+
#### Yarn
15+
```bash
16+
yarn add @angular/material @angular/cdk
17+
```
18+
1119

1220
#### Alternative: Snapshot Build
1321

1422
A snapshot build with the latest changes from master is also available. Note that this snapshot
1523
build should not be considered stable and may break between releases.
1624

25+
#### NPM
1726
```bash
1827
npm install --save angular/material2-builds angular/cdk-builds
1928
```
2029

30+
#### Yarn
31+
```bash
32+
yarn add angular/material2-builds angular/cdk-builds
33+
```
34+
2135
### Step 2: Animations
2236

2337
Some Material components depend on the Angular animations module in order to be able to do
2438
more advanced transitions. If you want these animations to work in your app, you have to
2539
install the `@angular/animations` module and include the `BrowserAnimationsModule` in your app.
2640

41+
#### NPM
2742
```bash
2843
npm install --save @angular/animations
2944
```
3045

46+
#### Yarn
47+
```bash
48+
yarn install @angular/animations
49+
```
50+
3151
**Note:** `@angular/animations` uses the WebAnimation API that isn't supported by all browsers yet.
3252
If you want to support Material component animations in these browsers, you'll have to
3353
[include a polyfill](https://github.com/web-animations/web-animations-js).

0 commit comments

Comments
 (0)