Mike Brocchi 9f77c868d2 feat(@angular/cli): Update command runner.
This change removes the dependency of the ember-cli command structure.
2018-03-06 17:57:38 -05:00

2.2 KiB

ng generate component

Overview

ng generate component [name] generates a component

Options

app

--app (aliases: -a) default value: 1st app

Specifies app name to use.

change-detection

--change-detection (aliases: -c)

Specifies the change detection strategy.

flat

--flat default value: false

Flag to indicate if a dir is created.

export

--export default value: false

Specifies if declaring module exports the component.

inline-style

--inline-style (aliases: -s) default value: false

Specifies if the style will be in the ts file.

inline-template

--inline-template (aliases: -t) default value: false

Specifies if the template will be in the ts file.

module

--module (aliases: -m)

Allows specification of the declaring module's file name (e.g `app.module.ts`).

prefix

--prefix

Specifies whether to use the prefix.

skip-import

--skip-import default value: false

Allows for skipping the module import.

spec

--spec

Specifies if a spec file is generated.

view-encapsulation

--view-encapsulation (aliases: -v)

Specifies the view encapsulation strategy.