I have an array of object that I use in a ng-repeat loop with an attribute referring to an another object by it's id.
{Description: 'something', OtherObjectId: 1}...
I'm using a directive to display information about the OtherObject in that ng-repeat loop.
<li ng-repeat="object in objects">
<div>{{object.Description}}</div>
<div other-object-info="date" other-object-id="{{object.OtherObjectId}}"></div>
</li>
The otherObjectInfo directive use innerHtml to put the requested info in that html tag
Now is the part that doesn't obviously work, I need to be able to filter that list with all the displayed informations, including the one inserted by the directives.
How would you resolve it? I guess the best way would be to include the OtherObject inside the objects array before rendering the view, but I like the simple way of using that directive because I need it in multiple views.
Thank you very much for your output!