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

25 lines
656 B
TypeScript
Raw Normal View History

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.
*/
2017-01-19 06:10:43 +00:00
angularViewArrayFactory.$inject = [
'$interval'
];
2017-01-19 06:10:43 +00:00
export function angularViewArrayFactory($interval): any {
const ADDITIONAL_ENTRIES: number = 20;
return {
create: function(): ViewArray {
2017-01-19 06:10:43 +00:00
return new ViewArrayImpl($interval, ADDITIONAL_ENTRIES);
}
};
}