24 lines
656 B
TypeScript
24 lines
656 B
TypeScript
import { ViewArray } from './view-array';
|
|
import { ViewArrayImpl } from './view-array.impl';
|
|
|
|
|
|
/**
|
|
* Specialized wrapper around array which provides a toggle() method for viewing the contents of the
|
|
* array in a manner that is asynchronously filled in over a short time period. This prevents long
|
|
* pauses in the UI for ngRepeat's when the array is significant in size.
|
|
*/
|
|
|
|
angularViewArrayFactory.$inject = [
|
|
'$interval'
|
|
];
|
|
|
|
export function angularViewArrayFactory($interval): any {
|
|
const ADDITIONAL_ENTRIES: number = 20;
|
|
|
|
return {
|
|
create: function(): ViewArray {
|
|
return new ViewArrayImpl($interval, ADDITIONAL_ENTRIES);
|
|
}
|
|
};
|
|
}
|
|
|