Skip to content
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

dasherize camelized bindings in handlebars #492

Closed
sandstrom opened this issue Feb 13, 2012 · 3 comments
Closed

dasherize camelized bindings in handlebars #492

sandstrom opened this issue Feb 13, 2012 · 3 comments

Comments

@sandstrom
Copy link
Contributor

It would be clean if {{view Em.TextField fooBarBinding="hello" }} would translate into <input type='text' foo-bar='hello'> instead of <input type='text' foobar='hello'>.

It is possible to setup dasherized attributes using foo-barBinding, but that syntax feels less right, since camelize is the js-standard (and dashes is the standard used in html attribute names since they are case-insensitive).

http://jsfiddle.net/DTwa6/3/

Let me know what you think?

@tborg
Copy link

tborg commented Oct 25, 2012

also, for aria-labelledby="dropdown" in bootstrap, and data- anything. Not that you should really need to use data attributes, but maybe you want to, or it makes sense. In fact it does make sense to interoperate with other libraries that depend on data in the dom so seamlessly.

@trek
Copy link
Member

trek commented Oct 25, 2012

Can you reopen on https://github.com/wycats/handlebars.js/

@tomdale
Copy link
Member

tomdale commented Nov 20, 2012

This should be fixed by the new attribute bindings colon separator syntax. It does require you to subclass a view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants