Angular 9 References/ CLI
References

Interceptor generator

This is the documentation for Angular 9.
You can switch to the latest version Angular 10.
ng generate interceptor <name> [--[option]=[value]]

Creates a new, generic interceptor definition in the given or default project.

Options

--flat#

When true (the default), creates files at the top level of the project.
Type boolean
Default true

--lintFix#

When true, applies lint fixes after generating the interceptor.
Type boolean
Default false

--project#

The name of the project.
Type string

--skipTests#

When true, does not create `spec.ts` test files for the new interceptor.
Type boolean
Default false