Skip to content

docs: Getting started guide update about animations #12377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 8 additions & 20 deletions guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ For help getting started with a new Angular app, check out the

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

### Step 1: Install Angular Material and Angular CDK
### Step 1: Install Angular Material, Angular CDK and Angular Animations

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.

#### NPM
```bash
npm install --save @angular/material @angular/cdk
npm install --save @angular/material @angular/cdk @angular/animations
```
#### Yarn
```bash
yarn add @angular/material @angular/cdk
yarn add @angular/material @angular/cdk @angular/animations
```


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

#### NPM
```bash
npm install --save angular/material2-builds angular/cdk-builds
npm install --save angular/material2-builds angular/cdk-builds angular/animations-builds
```

#### Yarn
```bash
yarn add angular/material2-builds angular/cdk-builds
yarn add angular/material2-builds angular/cdk-builds angular/animations-builds
```

### Step 2: Animations
### Step 2: Configure animations

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

#### NPM
```bash
npm install --save @angular/animations
```

#### Yarn
```bash
yarn add @angular/animations
```
Once the animations package is installed, import `BrowserAnimationsModule` into your application to enable animations support.

```ts
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
Expand All @@ -59,7 +47,7 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
export class PizzaPartyAppModule { }
```

If you don't want to add another dependency to your project, you can use the `NoopAnimationsModule`.
Alternatively, you can disable animations by importing `NoopAnimationsModule`.

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