One time binding does not work in AngularJS. Why?
Here is the piece of code:
<div ng-repeat="c in ::relatedCasesInfo.hideRelations(type.cases, info)
| limitTo:relatedCasesInfo.initialRelationsAmount track by c.idFromFirst"
class="initial-case-container">
<ng-include ng-repeat="name in [c.name + (type.otherCasesArePresent || !$last || type.cases.length > relatedCasesInfo.initialRelationsAmount ? ', ' : '' )]"
src="'dist/directiveTemplates/card/controls/relatedCases/casesContextMenu.html?v=' + $root.appVersion">
</ng-include>
</div>
Here is the hideRelations
function:
function hideRelations(relations, info) {
return relations;
};
After running the html I see that the hideRelations
is called infinitely many times. Why? What may I be missing here?