Angular-Cli 驼峰命名法 [英] Angular-Cli camelCase name
本文介绍了Angular-Cli 驼峰命名法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
似乎当我使用 angular cli 通过此命令和组件名称生成组件、服务等时
It seems that when I used angular cli to generate components,services etc.by this command and name of component
ng g component myApp
生成组件文件夹和其他文件如
It generate component folder and other files such as
my-app.component.ts
my-app.component.ts
改为 myapp.component.ts
instead myapp.component.ts
我的问题是,是否有任何命令可以使用驼峰命名生成组件、服务等.
My question is,Is there any command to generate components,services etc. with camelCase name.
我为此进行了研究,但没有任何效果.
I research for it,but nothing works.
推荐答案
Angular Style Guide 明确规定使用 my-app.component.ts
作为文件名.
Angular Style Guide explicitly says to use my-app.component.ts
for file names.
- dash-case(或kebab-case"):文件名的描述部分,组件选择器
参考:https://angular.io/guide/glossary
这篇关于Angular-Cli 驼峰命名法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文