一次绑定在 AngularJS 中不起作用。为什么?
这是一段代码:
<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>
这是hideRelations
功能:
function hideRelations(relations, info) {
return relations;
};
运行 html 后,我看到它hideRelations
被无限调用了很多次。为什么?我在这里可能缺少什么?