-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Why are some attribute selectors dash-cased? #6720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
As I'm progressing with this, I ran into some more:
|
This is actually working as intended. Button, menu items, and tab-nav all use We spent a long time discussing this internally. The rationale is that, because only one <button md-button disableRipple mdTooltip="Settings">...</button> In this, we see that If we did make the component selector camelCase, we'd also have to prefix all of its properties as well, which gets weird. Would you expect to write The dash-case here also aligns more with the custom element spec, which typically uses <button is="plastic-button">Click Me!</button> We considered changing the selector to use |
Hey @jelbourn thank you for the detailed write-up and now it definitely makes sense. I mean I fully get the reasoning behind those decisions, unfortunately it won't change the inconsistencies on the surface. E.g. I actually tried using I think it might be helpful to have a little section/chapter on material.angular.io which discusses these exceptions, otherwise people will keep running into these cases where they try to use components as components which they can't and then file issues, like I did. Another thing that unfortunately makes it a little more cumbersome: I now have to know the exact implementation to really know if I can use a directive/component as a component or as a directive ( Documenting this is probably the best thing to do then. Closing this as answered. Feel free to comment. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
MdButtonDirective
should have an[mdButton]
select. As of version beta.10, all dash-cased directives are deprecated in favour of their camelCased equivalents.What is the expected behavior?
This should give us a high-quality material button:
What is the current behavior?
The
mdButton
selectors aren't supported yet.Which versions of Angular, Material, OS, TypeScript, browsers are affected?
2.0.0-beta.10
Is there anything else we should know?
Everyone working on this material project is doing an outstanding job.
The text was updated successfully, but these errors were encountered: