From the course: Learning the Angular CLI
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Adding libraries using schematics - Angular Tutorial
From the course: Learning the Angular CLI
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Creating new code with schematics49s
-
(Locked)
Generating components and modules2m 20s
-
(Locked)
Generating directives56s
-
(Locked)
Generating pipes45s
-
(Locked)
Generating route guards1m 39s
-
(Locked)
Adding libraries using schematics1m 9s
-
(Locked)
Generating custom library1m 27s
-
(Locked)
Challenge: Generating services31s
-
(Locked)
Solution: Generating services42s
-
(Locked)
-
-
-