W3cubDocs

/Angular

generate

ng generate <schematic> [options]
ng g <schematic> [options]

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 Type

string

Options

defaults

Disable interactive input prompts for options with a default.

Value Type

boolean

Default

false

dry-run

Run through and reports activity without writing out results.

Value Type

boolean

Default

false

force

Force overwriting of existing files.

Value Type

boolean

Default

false

help

Shows a help message for this command in the console.

Value Type

boolean

interactive

Enable interactive input prompts.

Value Type

boolean

Default

true

Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/cli/generate