【问题标题】:Angular-Cli camelCase nameAngular-Cli camelCase 名称
【发布时间】:2021-10-31 16:47:24
【问题描述】:

似乎当我使用 angular cli 通过这个命令和组件名称生成组件、服务等时

ng g component myApp

生成组件文件夹等文件

my-app.component.ts

而不是 myapp.component.ts

我的问题是,是否有任何命令可以生成带有驼峰名称的组件、服务等。

我研究了它,但没有任何效果。

【问题讨论】:

标签: angular angular-cli naming-conventions


【解决方案1】:

Angular 样式指南明确规定使用my-app.component.ts 作为文件名。

  • dash-case(或“kebab-case”):文件名的描述部分,组件选择器

参考:https://angular.io/guide/glossary

【讨论】:

    猜你喜欢
    • 2018-11-21
    • 2019-08-10
    • 1970-01-01
    • 2013-03-22
    • 2017-09-18
    • 1970-01-01
    • 2020-03-19
    • 2017-07-18
    相关资源
    最近更新 更多