无法使用属性内联模板和内联样式在 angular6.1.1 中生成组件

can't generate component in angular6.1.1 with properties inline-template and inline-styles

我已经在 Ubuntu-18 机器上安装了 Angular6,

我通过 ng new project --routing

创建了项目

然后我想生成组件并使用内联样式和内联模板,

我的命令是 ng g c microsoftroute -it -is

但它在终端中给出了错误,

ng g c microsoftroute -it -is
Schematic input does not validate against the Schema: {"inlineStyle":true,"inlineTemplate":true,"i":[true,true],"changeDetection":"Default","styleext":"css","spec":true,"flat":false,"skipImport":false,"export":false,"entryComponent":false}
    Errors:

  Data path "" should NOT have additional properties(i).

在此之前我使用的是最新版本的anular6, 我的 ng -v 输出为

ng -v
     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|                |___/

Angular CLI: 6.1.1
Node: 8.11.3OS: linux x64
Angular: 6.1.0... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.7.1
@angular-devkit/build-angular     0.7.1
@angular-devkit/build-optimizer   0.7.1
@angular-devkit/build-webpack     0.7.1
@angular-devkit/core              0.7.1
@angular-devkit/schematics        0.7.1
@angular/cli                      6.1.1
@ngtools/webpack                  6.1.1
@schematics/angular               0.7.1
@schematics/update                0.7.1
rxjs                              6.2.2
typescript                        2.7.2
webpack                           4.9.2

您正在使用别名作为标志 -it -is,但在最新的 angular6 中,与以前不同,它们已更改为 -t for --inline-template-s for --inline-style,

angular-generate-component documentation for reference