I'm using the Justified Gallery jQuery plugin to work with Angular. I need to call the updateJustify() function after the ng-repeat has reordered itself. I suspect what is happening now is that when I change the sortorder it updates the gallery before it has even reordered. Is there a directive that can help me or any workarounds?
Please note this isn't for the first run through of 'ng-repeat'. I need to detect when the reordering of my ng-repeat has been completed so I can call my own function.
Here's the code from my HTML
<select ng-model="sortorder" ng-change='updateJustify()'>
<option value='' disabled selected> Filters </option>
<option value="+title">Title (A-Z)</option>
<option value="-title">Title (Z-A)</option>
<option value="+created">Created (New-Old)</option>
<option value="-created">Created (Old-New)</option>
</select>
<a href="#" data-ng-repeat='hero in heroarticles | orderBy: sortorder'">
<img data-ng-src='{{hero.imgPath}}' alt="{{hero.title}}" />
</a>
Thanks