Schematic is a template based code editor and Angular CLI, by default, comes with Schematic. Schematic is like a description that provides necessary information and options when addin dependencies. It is under @schematics/angular and it automatically rund when 'ng generate' or 'ng add' commands are used
Schematics
add schematic
Uses 'ng add' to add libraries. Unlike when installing dependencies with 'npm i' 'ng add' automatically add necessary configurations that are need to use the dependency too. So there is no need for us to go the module file and regisister the
generation schematic
Used to generate shematics.
ng generate @angular/material:table <component-name>
update schematic
This schematic is run when 'ng update' command is used. It updates workspace library for dependencies. All the sub dependencies will be updated automatically too.
▶ Basic Command
ng update
▶ To show available commands
ng update --help
▶ To update all dependencies
ng update --all // update all dependencies
▶ To update a specific dependency
ng update <dependencyName>
In this writing, we have got to know about the schematics and how to use it
'Frontend > Angular' 카테고리의 다른 글
Angular - Style Libraries (Bootstrap, Jquery, Font Awesome, ...) (0) | 2023.05.21 |
---|---|
Reusable Component - Reactive Forms Inputs (2) | 2023.05.08 |
Angular Library - Angular PWA (1) | 2023.03.30 |
Angular Library - Angular Animations (1) | 2023.03.30 |
Angular Library - Angular HttpClient (0) | 2023.03.30 |