3
Hello all right? I hope so! I’m still kinda Noob on the angular and today I came across a doubt, I need to spend two Xpression in the ng-show of Angularjs, I need the same do the show or Hide and arrow a var do $Scope for 'null', example I tried to:
<div class="col-sm-3 form-group" ng-show="!objParametros.tipo; objParametros.status=''">
<p>teste</p>
</div>
It will not work as desired, because when the first condition is true the variable will not be fulfilled. What he wants is that displaying or showing the component the variable is set to empty.
– Julio Borges
Then in addition to doing ng-show you will have to do an on-click for a function
– Marcelo Martins
Another way would be to create a method that returns bool and arrow the variable. More importantly, this can impact memory stacking in the DOM, as Angularjs' two-way-databinding stacks watches in memory to do the dirty work. The best would be to use an event in changing the objParametros.tipo to set the variable.
– Julio Borges