diff --git a/guides/getting-started.md b/guides/getting-started.md index 767adc6e89b..f0f4ebf739d 100644 --- a/guides/getting-started.md +++ b/guides/getting-started.md @@ -5,29 +5,49 @@ For existing apps, follow these steps to begin using Angular Material. ### Step 1: Install Angular Material and Angular CDK +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 ``` +#### Yarn +```bash +yarn add @angular/material @angular/cdk +``` + #### Alternative: Snapshot Build A snapshot build with the latest changes from master is also available. Note that this snapshot build should not be considered stable and may break between releases. +#### NPM ```bash npm install --save angular/material2-builds angular/cdk-builds ``` +#### Yarn +```bash +yarn add angular/material2-builds angular/cdk-builds +``` + ### Step 2: 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 install @angular/animations +``` + **Note:** `@angular/animations` uses the WebAnimation API that isn't supported by all browsers yet. If you want to support Material component animations in these browsers, you'll have to [include a polyfill](https://github.com/web-animations/web-animations-js).