Quick Intro
There are many articles on how to build your own Angular schematics but in this one we’re going to focus on using available schematics to the fullest! 💪
Most of the time we will be using @schematics/angular which are provided in Angular CLI out of the box.
What are we going to learn
- Use shortcuts, they are much faster and easier to type, duhhh 😂!
- Skip creation of an initial application
- Generate multiple applications and libs to promote code reuse
- Use schematics from different npm packages
- Set schematics defaults in angular.json file so that we don’t need to specify all the flags all the time
- Generate services — providedIn: 'root' vs --module flag (scoping to lazy-loaded modules)
- Use ng add to add libraries like Angular Material (or others)
Top comments (0)