angular / angular/components

Document why some attribute directive are dash-case and some are camelCase

オープン
#3,125 コメント 6 件 リアクション 12 件 担当者 0 名 GitHub で見る
area: many docs needs: discussion P4
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

#### Bug, feature request, or proposal:

Currently there is a confusion as to why `mdInput` is an attribute directive [which is the reason why it is written as `mdInput` instead of `md-input`] & `md-button` is a component

Since `md-button`(and other button variants) are used only as html attributes, it would be easy for the user's mental model if he can write

`` instead of `` similar to ``

#### What is the expected behavior?

Ability to use button variations using camelCase such as ``

#### What is the current behavior?

All button variations needs to be used using kabab cased attribute ``

#### What is the use-case or motivation for changing an existing behavior?

Now the user needs to know how button is implemented (which is why it is kabab case instead of camel), instead end user should not care how it is implemented, instead just knows elements follow kabab case & directives follow camelCase.

This way, the implementation detail does not leak to end user

The mental model of "html element => component", "html attribute => directive" is easy to remember & intuitive for most angular developers.

#### Which versions of Angular, Material, OS, browsers are affected?

2.0.0-beta.2

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

この issue では、ファイル、テスト、エントリーポイントが指定されていません。既存の mdInput と md-button の使用状況を比較して、意図された作業がドキュメントの整備なのか API の変更なのかを判断してください。完了するには、この曖昧さを解消し、命名の理由を文書化するか、要求されている camelCase の動作を定義する必要があります。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。