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

26 lines
725 B
TypeScript

import * as angular from 'angular';
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.
*/
angular
.module('quay')
.factory('AngularViewArray', AngularViewArrayFactory);
AngularViewArrayFactory.$inject = [
'$interval'
];
export default function AngularViewArrayFactory($interval): any {
return {
create: function(): ViewArray {
return new ViewArrayImpl($interval, 20);
}
};
}