How can I use multiple nested properties of an observable in a binding expression?
map is an observable with two properties, isEnabled and isPaused, that is nested within an observable, that is itself bound to page.bindingContext. If either properties are true I wish to do something. In this case, change the label's text.
<Label text="{{ map.isEnabled, map.isEnabled || map.isPaused, map.isPaused }}" />
^ Text output changes from true to false correctly as the properties change.
<Label text="{{ map.isEnabled, map.isEnabled || map.isPaused, map.isPaused ? 'Text one' : 'Text two' }}" />
^ Text output is still true or false. The ternary is completely ignored.
What is the correct way to do this?
ternary operator var1 ? var2 : var3 Evaluating the value of var1 and if true, returns var2, else returns var3.