Skip to content

Commit e2a158e

Browse files
fetismmalerba
authored andcommitted
docs: Getting started guide update about animations (#12377)
Closes #12365
1 parent 5502e6f commit e2a158e

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

guides/getting-started.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ For help getting started with a new Angular app, check out the
33

44
For existing apps, follow these steps to begin using Angular Material.
55

6-
### Step 1: Install Angular Material and Angular CDK
6+
### Step 1: Install Angular Material, Angular CDK and Angular Animations
77

88
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.
99

1010
#### NPM
1111
```bash
12-
npm install --save @angular/material @angular/cdk
12+
npm install --save @angular/material @angular/cdk @angular/animations
1313
```
1414
#### Yarn
1515
```bash
16-
yarn add @angular/material @angular/cdk
16+
yarn add @angular/material @angular/cdk @angular/animations
1717
```
1818

1919

@@ -24,29 +24,17 @@ build should not be considered stable and may break between releases.
2424

2525
#### NPM
2626
```bash
27-
npm install --save angular/material2-builds angular/cdk-builds
27+
npm install --save angular/material2-builds angular/cdk-builds angular/animations-builds
2828
```
2929

3030
#### Yarn
3131
```bash
32-
yarn add angular/material2-builds angular/cdk-builds
32+
yarn add angular/material2-builds angular/cdk-builds angular/animations-builds
3333
```
3434

35-
### Step 2: Animations
35+
### Step 2: Configure animations
3636

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.
5038

5139
```ts
5240
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
@@ -59,7 +47,7 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
5947
export class PizzaPartyAppModule { }
6048
```
6149

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`.
6351

6452
```ts
6553
import {NoopAnimationsModule} from '@angular/platform-browser/animations';

0 commit comments

Comments
 (0)