Document why some attribute directive are dash-case and some are camelCase
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
#### 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
Guía de contribución
Línea de trabajo
El issue no especifica archivos, pruebas ni puntos de entrada. Compara el uso existente de mdInput y md-button para determinar si el trabajo previsto es documentación o un cambio de API; para completarlo, habría que resolver esa ambigüedad y documentar la justificación de la nomenclatura o definir el comportamiento camelCase solicitado.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100