Create an Angular class.
ng generate class <schematic> <name> [options] or ng g class <schematic> <name> [options] generates class.
ng generate class <schematic> <name> [options]
ng g class <schematic> <name> [options]
schematic (optional) The schematic or collection:schematic to generate.
schematic
name (required) The name of the class.
name
--dryRun (alias -d) Run through without making any changes.
--dryRun
-d
--force (alias -f) Forces overwriting of files.
--force
-f
--project The name of the project.
--project
--spec Specifies if a spec file is generated.
--spec
--type Specifies the type of class.
--type
ng generate class my-class
Last updated 7 years ago