Skip to content

Commit 8aaca12

Browse files
elAndyGmmalerba
authored andcommitted
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.
1 parent 5144aa7 commit 8aaca12

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

guides/getting-started.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ yarn add @angular/material @angular/cdk @angular/animations
1717
```
1818

1919

20-
#### Alternative: Snapshot Build
20+
#### Alternative 1: Snapshot Build
2121

2222
A snapshot build with the latest changes from master is also available. Note that this snapshot
2323
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
3131
```bash
3232
yarn add angular/material2-builds angular/cdk-builds angular/animations-builds
3333
```
34+
#### Alternative 2: Angular Devkit 6+
35+
36+
Using the Angular CLI `ng add` command will update your Angular project with the correct dependencies, perform configuration changes and execute initialization code.
37+
38+
```bash
39+
ng add @angular/material
40+
```
3441

3542
### Step 2: Configure animations
3643

0 commit comments

Comments
 (0)