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