I have a simple ng-repeat
<div ng-repeat="obj in someArray"></div>
I would like to use the custom directive "type1" if obj.type == "type1"
and use the custom directive "type2" if obj.type == "type2"
. Is there a smart way to do that?
Edit
I will use this solution at different locations, so I would like to put the logic in the directive and not in the html. I was thinking that maybe I could use a "parent" directive that "includes" one directive or the other depending on obj.type
. What do you think?