Reputation: 13835
I want to do something basic like:
data-bind="visible: x || y"
showing if either x or y is set to true
Everything I've tried has failed so far though.
Upvotes: 1
Views: 638
Reputation:
When using observables in a formula like that, you need to call them as functions.
data-bind="visible: x() || y()"
Upvotes: 0
Reputation: 12128
If x
and y
are observable properties then you need to call them as methods:
data-bind="visible: x() || y()"
Upvotes: 5