My view model returns true , and I'm trying to get my template to add CSS accordingly. The problem is that I cannot find the syntax for a! = True.
I have something like this:
<div data-bind="css: {'lw-touched': checked, 'lw-touch': !checked}"></div>
What I would say, apply "lw-touched" if === true, apply "lw-touch" if === false. But this does not work :( Therefore, I tried this:
<div data-bind="css: {'lw-touched': checked, 'lw-touch': checked !== true}"></div>
Which didn't work either.
I am sure there is a way to do this! I just can't find it at the moment.
source share