From a189962a515051fd77e20bf8dd1815086a0d12ef Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 25 Sep 2023 08:32:43 +0000 Subject: [PATCH] feat(@schematics/angular): generate functional interceptors by default This commit updates the interceptor schematic to generate function intererceptors by default. BREAKING CHANGE: `ng g interceptor` now generate a functional interceptor by default. or guard by default. To generate a class-based interceptor the `--no-functional` command flag should be used. --- packages/schematics/angular/interceptor/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/interceptor/schema.json b/packages/schematics/angular/interceptor/schema.json index a75d02fc0b08..67c3b8e70a50 100755 --- a/packages/schematics/angular/interceptor/schema.json +++ b/packages/schematics/angular/interceptor/schema.json @@ -44,7 +44,7 @@ "functional": { "type": "boolean", "description": "Creates the interceptor as a `HttpInterceptorFn`.", - "default": false + "default": true } }, "required": ["name", "project"]