This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/js/services/angular-view-array/angular-view-array.ts

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);
}
};
}