tixif-ngx-busy
Version:
Angular 2 Busy: show busy/loading indicators on any promise, or on any Observable's subscription
37 lines (36 loc) • 1.21 kB
TypeScript
/**
* @file Directive: Busy
* @author yumao<yuzhang.lille@gmail.com>
*/
import { DoCheck, ViewContainerRef, ComponentFactoryResolver, Injector } from '@angular/core';
import { PromiseTrackerService } from './promise-tracker.service';
import { BusyService } from './busy.service';
/**
* ### Syntax
*
* - `<div [ngBusy]="busy">...</div>`
* - `<div [ngBusy]="[busyA, busyB, busyC]">...</div>`
* - `<div [ngBusy]="{busy: busy, message: 'Loading...', backdrop: false, delay: 200, minDuration: 600}">...</div>`
*/
export declare class BusyDirective implements DoCheck {
private service;
private tracker;
private cfResolver;
private vcRef;
private injector;
options: any;
private optionsRecord;
private optionsNorm;
template: string;
backdrop: boolean;
private busyRef;
private backdropRef;
constructor(service: BusyService, tracker: PromiseTrackerService, cfResolver: ComponentFactoryResolver, vcRef: ViewContainerRef, injector: Injector);
private normalizeOptions(options);
private dectectOptionsChange();
ngDoCheck(): void;
ngOnDestroy(): void;
private destroyComponents();
private createBackdrop();
private createBusy();
}