본문 바로가기

Frontend/Angular

Angular Library - Angular Schematics

반응형

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

 

728x90
반응형