I have a table that has multiple pages and a navigation to scroll through the pages. I have a function in my ng-click "refill_checkboxes" that should be executed after the next page is rendered but it is always executed first. How can I do it the right way?
<table>
<thead>
<th>Term</th>
<th class="check">Check</th>
</thead>
<tr ng-repeat="term in data | slice:panel.offset:panel.offset+panel.size" ng-show="showMeta(term)" ng-attr-id="{{term.id}}">
<td>{{term.label}}</td>
<td><input type="checkbox" ng-click="switch_TermsCheck(term,this)" ng-attr-id="{{term.id}}" value="term" /></td>
</tr>
</table>
<div>
<i ng-click="panel.offset = (panel.offset + panel.size);refill_checkboxes(this);" ng-show="data.length > panel.offset+panel.size" class='icon-arrow-right pointer'></i>
</div>