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

Implement hyphens in data-bind attributes and optional '=' #63

Merged
merged 3 commits into from
Dec 16, 2011
Merged

Implement hyphens in data-bind attributes and optional '=' #63

merged 3 commits into from
Dec 16, 2011

Conversation

tristanls
Copy link
Collaborator

Fixes #62 per @tlack 's suggestion
Helps prevent #55 per @tlack 's suggestion

}, '<div><span data-bind="first, name name, firstColor firstColor"/>' +
'<span data-bind="last, name name, lastColor lastColor"/></div>');
'last-color': 'Blue'
}, '<div><span data-bind="first, name=name, firstColor=firstColor"/>' +
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it also work with arbitrary spaces around the equal sign, like:

  data-bind="first, name     = name, firstColor = firstColor"

?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK just tested this and it does work :)

@arturadib
Copy link
Owner

Awesome, thanks Tristan!

Maybe in the near future we can deprecate using spaces in favor of equal signs (I agree with @tlack that it is more readable).

arturadib added a commit that referenced this pull request Dec 16, 2011
Implement hyphens in data-bind attributes and optional '='
@arturadib arturadib merged commit f4ac7dc into arturadib:master Dec 16, 2011
arturadib added a commit that referenced this pull request Dec 16, 2011
@tristanls
Copy link
Collaborator Author

@arturadib I agree on the deprecation of using spaces

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

Successfully merging this pull request may close these issues.

Data bindings don't seem to work when element attributes are hyphenated
2 participants