add ng add as an install alternative to npm/yarn (#12471)

Letting users know that the `ng add` command will simplify the install process if they are not on the latest versions of Angular. I found that by doing the stock npm install, the @angular/cdk and @angular/animations versions did not match what was already installed causing conflicts in the dependencies.
This commit is contained in:
ElAndyG
2018-08-13 20:03:39 -04:00
committed by mmalerba
parent 5144aa790d
commit 8aaca12303
+8 -1
View File
@@ -17,7 +17,7 @@ yarn add @angular/material @angular/cdk @angular/animations
```
#### Alternative: Snapshot Build
#### Alternative 1: 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.
@@ -31,6 +31,13 @@ npm install --save angular/material2-builds angular/cdk-builds angular/animation
```bash
yarn add angular/material2-builds angular/cdk-builds angular/animations-builds
```
#### Alternative 2: Angular Devkit 6+
Using the Angular CLI `ng add` command will update your Angular project with the correct dependencies, perform configuration changes and execute initialization code.
```bash
ng add @angular/material
```
### Step 2: Configure animations