You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-4Lines changed: 12 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -199,8 +199,8 @@
199
199
|191|[How do you select an element in component template?](#how-do-you-select-an-element-in-component-template)|
200
200
|192|[What is TestBed?](#what-is-testbed)|
201
201
|193|[What is protractor?](#what-is-protractor)|
202
-
|194|[](#)|
203
-
|195|[](#)|
202
+
|194|[What is collection?](#what-is-collection)|
203
+
|195|[How do you create schematics for libraries?](#how-do-you-create-schematics-for-libraries)|
204
204
|196|[](#)|
205
205
|197|[](#)|
206
206
|198|[](#)|
@@ -2939,11 +2939,19 @@
2939
2939
2940
2940
**[⬆ Back to Top](#table-of-contents)**
2941
2941
2942
-
194. ### ?
2942
+
194. ### What is collection?
2943
+
Collection is a set of related schematics collected in an npm package. For example, `@schematics/angular` collection is used in Angular CLI to apply transforms to a web-app project. You can create your own schematic collection for customizing angular projects.
2943
2944
2944
2945
**[⬆ Back to Top](#table-of-contents)**
2945
2946
2946
-
195. ### ?
2947
+
195. ### How do you create schematics for libraries?
2948
+
You can create your own schematic collections to integrate your library with the Angular CLI. These collections are classified as 3 main schematics,
2949
+
1. **Add schematics:** These schematics are used to install library in an Angular workspace using `ng add` command.
2950
+
For example, @angular/material schematic tells the add command to install and set up Angular Material and theming.
2951
+
2. **Generate schematics**: These schematics are used to modify projects, add configurations and scripts, and scaffold artifacts in library using `ng generate` command.
2952
+
For example, @angular/material generation schematic supplies generation schematics for the UI components. Let's say the table component is generated using `ng generate @angular/material:table `.
2953
+
3. **Update schematics:** These schematics are used to update library's dependencies and adjust for breaking changes in a new library release using `ng update` command.
2954
+
For example, @angular/material update schematic updates material and cdk dependencies using `ng update @angular/material` command.
0 commit comments