Before we can play with Angular Material and the Angular CDK, we need to install the required dependencies for our new Angular CLI project.
Previously you'd have done all of the setup steps manually and potentially might miss
some of the options that are available when setting up a Material project. Now with the
ng add
command, the whole step is a single command that needs to be run.
ng add @angular/material
Since our ng-add
schematic supports CLI prompts, you have to specify a few of the
available options in order to complete the setup.
-
Select whatever theme you want to use in our workshop. You are free to choose!
-
Decide whether you want to use gestures with HammerJS. In our case we don't need it necessarily, but in favor of showcasing, we will add it.
-
Decide whether you want to use the
BrowserAnimationsModule
or no animations at all. In this workshop we will be using animations.