From the course: Learning the Angular CLI

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Adding libraries using schematics

Adding libraries using schematics - Angular Tutorial

From the course: Learning the Angular CLI

Start my 1-month free trial

Adding libraries using schematics

- [Instructor] The Angular CLI provides us with an easy way to add an npm package for a published library and can also configure our application and modify files so that it is ready to go. For example, let's say we want to use Angular Material in our application. The Angular Material team has created a schematic that we can easily use. We can use that by running ng add and then the name of the package. In this case it's @angular/material. It will ask us a couple of questions. This case I will go with the first option here and I will choose yes to set up global Angular Material typography. Set up browser animations? Yes. And once the questions are done it will install the necessary packages and also modify any files. Taking a look at the changes, you can see that it not only modify my package.json file but it also modified my application code with necessary changes. Just a quick note, you should first look at a…

Contents