Document why some attribute directive are dash-case and some are camelCase
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
#### 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
L’issue non indica alcun file, test o punto di ingresso. Confronta l’uso esistente di mdInput e md-button per determinare se il lavoro previsto riguarda la documentazione o una modifica dell’API; per completarlo, sarebbe necessario risolvere questa ambiguità e documentare la motivazione della denominazione oppure definire il comportamento camelCase richiesto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- frontend
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100