'What does "default collection in your Angular CLI project" mean?
I installed "@ngrx/schematics" and it asked me -
"Do you want to use @ngrx/schematics as the default collection?"
I am not sure what "default collection" means.
The default value is "Yes". Selecting "Yes" adds this entry to the angular.json file:
"cli": {
"defaultCollection": "@ngrx/schematics"
}
I could not find any documentation as to what being a "default collection" exactly means. The ngrx page only mentions the flag as optional -
defaultCollection - Use @ngrx/schematics as the default collection.
and this angular page mentions
The default schematics collection to use.
Follow up question - If I want to remove this change, then what should I do ? Should I just removethe entry from angular.json or replace it with some other value ?
Solution 1:[1]
It is for the ng cli tool (ng g) to extend from the base schematics automatically without prepending the package schematics name:
If you specify anything different, like
@angular-eslint/schematics, @ngrx/schematics. It enables command like ng generate to execute package specific command and settings automatically, like ng generate create-effect-migration instead of ng generate @ngrx/schematics:create-effect-migration
It has been replaced by schematicCollection as of writing(a list of default schematics to extend).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Vincent-cm |
