generate interceptor
Command
ng generate interceptorCreates a new, generic interceptor definition in the given project.
Arguments
nameThe name of the interceptor.
Value Type
stringOptions
flatWhen true (the default), creates files at the top level of the project.
Value Type
booleanDefaulttruefunctionalCreates the interceptor as a HttpInterceptorFn.
Value Type
booleanDefaulttrueprojectThe name of the project.
Value Type
stringskip-testsDo not create "spec.ts" test files for the new interceptor.
Value Type
booleanDefaultfalseJump to details