Pending Review
Last Updated: 15 Jun 2020 14:36 by Will
Imported User
Created on: 05 Oct 2017 16:25
Category: MVVM
Type: Feature Request
3
Negation Operator on Bindings
I was trying to use negation operator in a binding using MVVM, just like angular does it, for example I am going to use, you could say why don't use "invisible", it could work on this example, but we have some others custom bindings, or some other scenarios were we have to create multiple properties to handle that, which is a pain.
EX
<div id="example-1" data-bind="visible: !IsNotAdmin"></div>
<div id="example-1" data-bind="customBinding: !IsAdmin"></div>
So, are you supporting the negation operator on bindings or are you planning to do it?
1 comment
Will
Posted on: 15 Jun 2020 14:36
Negation would be nice as a workaround but the real question in my mind is: if in every widget that supports control of visibility uses "VISIBLE" why in the world did someone think that when applying MVVM to HTML objects being so inconsistent as to use "INVISIBLE" was a good idea.  Is someone working to complicate things rather than simplify them? Geez!