Paul Paul - 1 year ago 85
AngularJS Question

Are complex expressions possible in ng-hide / ng-show?

I want to do so:

ng-hide="!globals.isAdmin && mapping.is_default"

but the expression evaluates always to

I do not want to define special function on

Answer Source

Use a controller method if you need to run arbitrary JavaScript code, or you could define a filter that returned true or false.

I just tested (should have done that first), and something like ng-show="!a && b" worked as expected.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download