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

Conditional attributes are not properly bound #293

Closed
borismus opened this issue Sep 23, 2013 · 1 comment
Closed

Conditional attributes are not properly bound #293

borismus opened this issue Sep 23, 2013 · 1 comment

Comments

@borismus
Copy link

Component markup:

<p>
<label for="labels">Show labels</label>
<input type="checkbox" id="labels" checked?="{{labels}}">
</p>

Implementation with

labels: false,  
labelsChanged: function() {
  console.log('labels is', this.labels);
},

Clicking the checkbox does not cause labelsChanged to fire or labels to update. More complete example: http://jsbin.com/igEwaGO/1/edit

I'm assuming that this should work based on https://github.com/Polymer/TemplateBinding/blob/master/examples/how_to/conditional_attributes.html

/cc @rafaelw

@borismus
Copy link
Author

User error. Using = instead of ?= works.

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

1 participant