Create component to specific module with Angular-CLI

后端 未结 26 1975
既然无缘
既然无缘 2021-01-29 19:46

I\'m starting to use angular-cli and I\'ve already read a lot to find an answer about what I want to do...no success, so I came here.

Is there a way to create a componen

26条回答
  •  悲哀的现实
    2021-01-29 20:25

    this is what worked for me :

    1 -->  ng g module new-module
    
    2 -->  ng g c new-module/component-test --module=new-module/new-module.module.ts
    

    If you want to generate a component without its directory use --flat flag.

提交回复
热议问题