Angular 9 References/ CLI

Class generator

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

Create a class.



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


The name of the project.
Type string
Default projectName


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


Adds a developer-defined type to the filename, in the format `name.type.ts`.
Type string