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?
Hi,
I am glad that we were able to provide the needed information to clear things.
Regards,
Angel Petrov
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
Hi Angel,
If I missed the ‘Visible’ binding, I apologize for my little rant.
That said, I don’t know how I would have stumbled on ‘Invisible’ if ‘Visible’ was working at the time. I can’t go back to how things were a year ago nor tell you what version I was basing my complaint upon. But it wouldn't be the first time if I was wrong.
It’s niece to see that ‘Visible’ is available now and that it appears to be well documented.
Thanks,
Will DoughertyHello,
Negation is not really the issue here. The real question is how to support complex evaluations inside the statements. The answer is to use a function in which to evaluate the desired. Here is a dojo that illustrates this.
As for visible vs invisible both are supported when it comes to applying MVVM to HTML. That said one can use the approach most suitable for him.
Regards,
Angel Petrov
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.