Question

broken demo : http://plnkr.co/edit/EWOvKsTEutiveMEAGTKf?p=preview

<li ng-show="showList" ng-repeat="task in tasks" ng-hide="task.checked=1">
  {{task.name}}
</li>

can I place ng-show and ng-hide on the same tag? I want to hide checked task but when I click show all list, the result would be a list that excluded checked task.

Was it helpful?

Solution

how about using and(&&) or or(||) on the same attribute either ngHide or ngShow to evaluate the expression (exp1) || (expr2)? Like

ng-hide="Expr1=='something' || Expr2=='else'"

You can refer to this other POST for more information:

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

Here is a plunker demo

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top