I have a use case where I have to bind value to column in table by triggering a call to function which returns username. The table rows is looped using ng-repeat-start and pagination is used to display records.
Code 1 :
<td class="col-sm-2 col-md-2 col-lg-2">
{{::getLogUserName(site,key,innerKey)}}
</td>
Code 2 :
<td class="col-sm-2 col-md-2 col-lg-2"
ng-init="userName = getLogUserName(site,key,innerKey)">
{{userName}}
</td>
Code 3 :
<td class="col-sm-2 col-md-2 col-lg-2"
ng-init="userName = ::getLogUserName(site,key,innerKey)">
{{userName}}
</td>
Above 3 examples works fine in Page 1, but for subsequent pages the function is not triggered in most scenarios.
Code 4 :
<td class="col-sm-2 col-md-2 col-lg-2">
{{getLogUserName(site,key,innerKey)}}
</td>
getLogUserName gets trigerred for each click event and action, which should not be the case since pagintion entries could be 100 per page and triggering of the function each time is not expected.
Is there an alternate to achieve the functionality am expecting without compromising on performance