I have to put post-it note somewhere:
PUT ( ) on every binding that's part of the expression!
It's so misleading - if you have regular data binding to the something like this:
<div data-bind="text: customer.name"></div>
that works without parenthesis.
If you have expression, don't forget your ()!
'class': $root.currentColor().name() === $data.name() ? ...
PUT ( ) on every binding that's part of the expression!
It's so misleading - if you have regular data binding to the something like this:
<div data-bind="text: customer.name"></div>
that works without parenthesis.
If you have expression, don't forget your ()!
'class': $root.currentColor().name() === $data.name() ? ...
No comments:
Post a Comment