I know you are probably itching to try it out, so let's delay no further. First off, we need to install it. Let's start out by ensuring we have an Angular project ready to install it on, by telling the Angular CLI to scaffold a project for us, like so:
ng new AngularMaterialDemo
Now it is time to install the necessary dependencies for Angular Material:
npm install --save @angular/material @angular/cdk
Now let us also install support for animations. It isn't strictly necessary for it to work but we want some cool animations, right?
The following is needed to install it:
npm install @angular/animations
Thereby, we are done installing Angular Material and are ready to use it in our app. As we have learned from previous chapters, to use external Angular modules, we need to import them. Once that is done, we can start using the constructs that these modules publicly export. In reality, there are many modules to import, depending on what we need, for example, every control has its own module but animation has only one.