angular-tree-control
angular-tree-control copied to clipboard
Use ng-repeat with track by to prevent dupes and improve performance
- Prevents ng-repeat dupes error
- Improve ng-repeat performance
I have checked the commit, but some tests are failing - specifically regarding filtering
track by
should be placed after all filters
ng-repeat="node in node.{{options.nodeChildren}} | filter:filterExpression:filterComparator {{options.orderBy}} track by $index"
But where we must put this track by $index. I've try to add into template directly and is translated like:
The template it looks like: '<li ng-repeat="node in node.' + $scope.options.nodeChildren + ' | filter:filterExpression:filterComparator ' + orderBy + '" ng-class="headClass(node)" track by $index '+classIfDefined($scope.options.injectClasses.li, true)+'>' +