CLI

generate class

Command
ng generate class
ng generate cl

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

Arguments

name

The name of the new class.

Value Typestring

Options

project

The name of the project.

Value Typestring
skip-tests

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

Value TypebooleanDefaultfalse
type

Adds a developer-defined type to the filename, in the format "name.type.ts".

Value Typestring
Jump to details