Angular ng generate component

https://github.com/angular/angular-cli/wiki/generate-component

ng generate component

Overview

ng generate component [name] generates a component

Options

dry-run

--dry-run (alias: -d)

Run through without making any changes.

force

--force (alias: -f)

Forces overwriting of files.

project

--project

The name of the project.

inline-style

--inline-style (alias: -s)

Specifies if the style will be in the ts file.

inline-template

--inline-template (alias: -t)

Specifies if the template will be in the ts file.

view-encapsulation

--view-encapsulation (alias: -v)

Specifies the view encapsulation strategy.

change-detection

--change-detection (alias: -c)

Specifies the change detection strategy.

prefix

--prefix (alias: -p)

The prefix to apply to generated selectors.

styleext

--styleext

The file extension to be used for style files.

spec

--spec

Specifies if a spec file is generated.

flat

--flat

Flag to indicate if a dir is created.

skip-import

--skip-import

Flag to skip the module import.

selector

--selector

The selector to use for the component.

module

--module (alias: -m)

Allows specification of the declaring module.

export

--export

Specifies if declaring module exports the component.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值