Angular 7 References/ CLI

Class generator

This is the documentation for Angular 7.
You can switch to the latest version Angular 10.
ng generate class [name] [--[argument]=[value]]
ng generate cl

Create a class.



The name of the project.
Type string
Default projectName


Specifies if a spec file is generated.
Type boolean
Default false


Specifies the type of class.
Type string