CLI

generate

Command
ng generate
ng g

Generates and/or modifies files based on a schematic.

Sub-commands

This command has the following sub-commands

Arguments

schematic

The [collection:schematic] to run.

Value Typestring

Options

defaults

Disable interactive input prompts for options with a default.

Value TypebooleanDefaultfalse
dry-run
Aliasd

Run through and reports activity without writing out results.

Value TypebooleanDefaultfalse
force

Force overwriting of existing files.

Value TypebooleanDefaultfalse
help

Shows a help message for this command in the console.

Value Typeboolean
interactive

Enable interactive input prompts.

Value TypebooleanDefaulttrue
Jump to details