angular脚手架cli使用

1、自定义组件:

ng  g  component  components/header

其中components是组件要存放的目录,如果不加,则会存放在app目录下。

2、其他自定义创建命令:

ng  g  directive  my-new-directive

ng  g  pipe  my-new-pipe

ng  g  service  my-new-service

ng  g  class  my-new-class

ng  g  guard  my-new-guard

ng  g  interface  my-new-interface

ng  g  enum  my-new-enum

ng  g  module  my-new-module

 

你可能感兴趣的:(Angular)