Small AngularJS library for easy batching of ng-repeat renders. Heavily inspired by Todd Motto.
Notes:
- This project is currently under development and is not recommended for production use.
- Public API has potential to change.
import 'gj-batched-repeatable';
angular.module('your.module', ['gj-batched-repeatable'])import { BatchedRepeatable, BatchedRepeatableFactory } from 'gj-batched-repeatable';
export class MyController {
public static $inject = ['$batchedRepeatableFactory'];
public collection: BatchedRepeatable<T>
constructor(private $batchedRepeatableFactory: BatchedRepeatableFactory) {
this.collection = $$batchedRepeatableFactory.create([/*large collection*/], /* Batch Size */ 10);
}
}<ul>
<li ng-repeat="item in $ctrl.collection.batched track by $index"><li>
</ul>