generate interceptor
Command
ng generate interceptor
Creates a new, generic interceptor definition in the given project.
Arguments
name
The name of the interceptor.
Value Type
string
Options
flat
When true (the default), creates files at the top level of the project.
Value Type
boolean
Defaulttrue
functional
Creates the interceptor as a HttpInterceptorFn
.
Value Type
boolean
Defaulttrue
project
The name of the project.
Value Type
string
skip-tests
Do not create "spec.ts" test files for the new interceptor.
Value Type
boolean
Defaultfalse
Jump to details