CLI

generate interceptor

Command
ng generate interceptor

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

Arguments

name

The name of the interceptor.

Value Typestring

Options

flat

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

Value TypebooleanDefaulttrue
functional

Creates the interceptor as a HttpInterceptorFn.

Value TypebooleanDefaulttrue
project

The name of the project.

Value Typestring
skip-tests

Do not create "spec.ts" test files for the new interceptor.

Value TypebooleanDefaultfalse
Jump to details