From the course: Creating Angular Libraries
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Angular schematics overview - Angular Tutorial
From the course: Creating Angular Libraries
Angular schematics overview
- [Instructor] An Angular schematic is a collection of custom codes you want to reuse across multiple projects, along with instructions that tell the Angular CLI tool how to incorporate that code into consuming applications. You use schematics anytime you run the ng add, ng generate, or ng update command. Many custom libraries include a schematic for the ng add command, but it's not required. Consumers can always use NPM to install your library, but schematics can make the developer experience better by automatically adding and modifying files, or by giving consumers a menu of options during installation. The ng generate command uses schematics to scaffold new code based on templates. This is what Angular CLI does every time you generate a new component or service or any other built-in feature. Schematics for the ng update command let consumers quickly install the latest version of your library, and automatically resolve any breaking changes. This can be a much better developer…