ng generate <schematic> [options] ng g <schematic> [options]
参数和语法 | 说明 |
<schematic> | 原理图集合:要生成的原理图。此选项可以采用以下子命令之一: appShell application class component directive enum guard interceptor interface library module pipe service serviceWorker webWorker |
选项和语法 | 说明 |
--defaults=true|false | 如果为 true,则禁用默认选项的交互式输入提示。 |
--dryRun=true|false |
当为真时,运行并报告活动而不写出结果。
默认值:false。
别名:-d。
|
--force=true|false |
当为真时,强制覆盖现有文件。
默认值:false。
别名:-f。
|
--help=true|false|json|JSON |
在控制台中显示此命令的帮助消息。
默认值:false。
|
--interactive=true|false | 当为 false 时,禁用交互式输入提示。 |
\>Node\>Lidihuo> ng generate component goals CREATE src/app/goals/goals.component.html (20 bytes) CREATE src/app/goals/goals.component.spec.ts (621 bytes) CREATE src/app/goals/goals.component.ts (271 bytes) CREATE src/app/goals/goals.component.css (0 bytes) UPDATE src/app/app.module.ts (471 bytes)