Document why some attribute directive are dash-case and some are camelCase
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
#### 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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
L’issue ne nomme aucun fichier, test ou point d’entrée. Comparez l’utilisation existante de mdInput et md-button afin de déterminer si le travail prévu concerne la documentation ou une modification de l’API ; pour terminer, il faudrait résoudre cette ambiguïté et soit documenter la justification du nommage, soit définir le comportement camelCase demandé.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100