代码之家  ›  专栏  ›  技术社区  ›  GD- Ganesh Deshmukh

无法在Angular6.1.1中生成具有属性inline模板和inline样式的组件

  •  1
  • GD- Ganesh Deshmukh  · 技术社区  · 8 年前

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

    我创建了项目 ng new project --routing ,

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

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

    但它在终端A中出错,

    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 是AS

    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
    
    1 回复  |  直到 8 年前
        1
  •  1
  •   user9610533    8 年前
    推荐文章