Question about optimizing performance in Angular JS.
I am using ng-repeat to display a list of search results. Each search item is extracted using a directive/template.
Should I wrap two directives with ng-if statements or use one directive with multiple ng-if statements, and utilize expressions or statements?
For example, using ng-if statements to wrap two directives:
<div ng-repeat>
<directive-1 ng-if="this"></directive-1>
<directive-2 ng-if="that"></directive-2>
</div>
OR
<div ng-repeat>
<directive-1></directive-1>
</div>
and inside directive-1 you have...
<img src="1" ng-if="this">
<img src="2" ng-if="that">
<span>{{title || title2}}</span>
etc...