Installing Angular Material

Learn how to install Angular Material in an application.

The Angular Material library is an npm package. To install it, we need to manually execute the npm install command and import several Angular modules into our Angular application. Luckily, the Angular team has automated these interactions by creating the necessary schematics to install it using the Angular CLI.

Steps for installing Angular Material on local machine

We can use the ng add Angular CLI command to install Angular Material in an existing Angular application:

Note: The command below is for adding Angular Material in an application on the local machine using the Angular CLI.

Get hands-on with 1200+ tech skills courses.