When my ng-if
evaluates to TRUE, I want it to trigger an ng-show="someMethod()"
.
What is the most effective approach for achieving this?
Would it be advisable to first execute my ng-if
, then use ng-init="someMethod()"
and within someMethod()
, somehow implement a mock of ng-show
?
HTML:
<div ng-repeat="(key,item) in foodOptions" ng-class={hidden : item.type != currentSection.type}" >
Subsequently, I intend to use an ng-if to check against a specific condition such as ng-if="item.type === 'pizza'"
- which will then trigger ng-show="someMethod()"
to filter available dropdowns on the page.