Angular CLI ng g module 参数

来源:互联网 发布:知乎 中国到底有多强大 编辑:程序博客网 时间:2024/06/06 13:19

1、在用idea创建模块时,默认是不带参数的,光杆司令一个没有组件同步生成
2、依稀记得之前看过一张表,就是介绍CLI生成模块的参数,百度不到了
3、然后github上看了下恍然大悟,直接用–help参数就知道有哪些可用的参数了
4不多说直接上命令:

C:\Users\xx\IdeaProjects\ncn-w>ng  g  module --helpng generate module [name] <options...>    --dry-run Run through without making any changes.      aliases:  -d -dryRun    --force Forces overwriting of files.      aliases:  -f -force    --app Specifies app name to use.      aliases:  -a -app    --collection Schematics collection to use.      aliases:  -c -collection    --lint-fix Use lint to fix files after generation.      aliases:  -lf -lintFix    --routing (boolean)    --routing-scope (string) (Default: Child)    --spec (boolean) (Default: true)    --flat (boolean)    --common-module (boolean) (Default: true)    --module (string) Allows specification of the declaring module.      aliases:  -m

5、下次要长记性了!

原创粉丝点击