How to update angular material

Kram_ picture Kram_ · Nov 30, 2017 · Viewed 60.7k times · Source

What is the best way to update angular material in a project to latest version [email protected] ?

I tried:

npm install --save @angular/material @angular/cdk

Answer

K. Waite picture K. Waite · Dec 11, 2017

You'll want to use the npm update command. An example would look like this.

npm update @angular/material @angular/cdk

This will install the latest stable version. If you would like to target a specific version, you would have to specify it by adding the version to the end after an @ symbol.

Additionally, you can check for outdated packages with

npm outdated

Here's the documentation on npm update.

https://docs.npmjs.com/cli/update