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/view-array/view-array.factory.ts

30 lines
716 B
TypeScript
Raw Normal View History

import { ViewArray } from './view-array';
import { ViewArrayImpl } from './view-array.impl';
import { Inject } from '../../decorators/inject/inject.decorator';
/**
* Factory for creating ViewArray instances.
*/
export class ViewArrayFactory {
private ADDITIONAL_ENTRIES: number = 20;
/**
* @param $interval Angular $interval service.
* @return viewArrayFactory A factory for creating ViewArray objects.
*/
constructor(@Inject('$interval') private $interval: ng.IIntervalService) {
}
/**
* Create a new ViewArray object.
* @return viewArray New ViewArrayImpl instance.
*/
public create(): ViewArray {
return new ViewArrayImpl(this.$interval, this.ADDITIONAL_ENTRIES);
}
}