Document why some attribute directive are dash-case and some are camelCase
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 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
Contributor guide
Research direction
The issue does not name any files, tests, or entry points. Compare the existing mdInput and md-button usage to determine whether the intended work is documentation or an API change; completion would require resolving that ambiguity and either documenting the naming rationale or defining the requested camelCase behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100