fundamental-ngx
Version:
SAP Fiori Fundamentals, implemented in Angular
33 lines (32 loc) • 1.22 kB
TypeScript
import { ComponentFactoryResolver, ApplicationRef, Injector, TemplateRef, Type } from '@angular/core';
import { AlertConfig } from '../alert-utils/alert-config';
import { AlertRef } from '../alert-utils/alert-ref';
/**
* Service used to dynamically generate an alert as an overlay.
*/
export declare class AlertService {
private componentFactoryResolver;
private appRef;
private injector;
private alerts;
private alertContainerRef;
/** @hidden */
constructor(componentFactoryResolver: ComponentFactoryResolver, appRef: ApplicationRef, injector: Injector);
/**
* Returns true if there are some alerts currently open. False otherwise.
*/
hasOpenAlerts(): boolean;
/**
* Opens an alert component with a content of type TemplateRef, Component Type or String.
* @param content Content of the alert component.
* @param alertConfig Configuration of the alert component.
*/
open(content: TemplateRef<any> | Type<any> | string, alertConfig?: AlertConfig): AlertRef;
/**
* Dismisses all service-opened alerts.
*/
dismissAll(): void;
private destroyAlertComponent;
private openAlertContainer;
private destroyAlertContainer;
}