angular-cli
angular-cli copied to clipboard
feat(@schematics/angular): generate functional interceptors
PR Checklist
Please check to confirm your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://github.com/angular/angular-cli/blob/main/CONTRIBUTING.md#-commit-message-guidelines
- [x] Tests for the changes have been added (for bug fixes / features)
- [x] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:
What is the current behavior?
ng g interceptor generates a class-based interceptor
What is the new behavior?
Adds a --functional flag to the interceptor schematic to generate a functional interceptor (as we can now do for guards and resolvers)
Does this PR introduce a breaking change?
- [ ] Yes
- [x] No