Document why some attribute directive are dash-case and some are camelCase
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
#### 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
Beitragsleitfaden
Rechercherichtung
Das Issue nennt keine Dateien, Tests oder Einstiegspunkte. Vergleiche die bestehende Verwendung von mdInput und md-button, um festzustellen, ob die beabsichtigte Arbeit Dokumentation oder eine API-Änderung ist; für den Abschluss müsste diese Unklarheit beseitigt und entweder die Begründung für die Benennung dokumentiert oder das angeforderte camelCase-Verhalten definiert werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100