0

I have been working with a checkbox component and i noticed different workflows for checked$="{{model.isChecked}}" vs checked="{{model.isChecked}}" and i wanted to know what the $ actually does.

It seems there are some artifacts with the design.

Ideally, when it is checked it will toggle the value in model.

Thanks

Fallenreaper
  • 10,222
  • 12
  • 66
  • 129

1 Answers1

0

https://www.polymer-project.org/1.0/docs/devguide/data-binding#attribute-binding

checked$="...." binds to the attribute which is added to the DOM.

checked="..." binds to the property and only reflects to the attribute if reflectToAttribute is set to true (`https://www.polymer-project.org/1.0/docs/devguide/properties) or if it is a native property that reflects to an attribute.

See also Properties and Attributes in HTML

Community
  • 1
  • 1
Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567