@angular-mdc/web
Version:
24 lines (23 loc) • 1.28 kB
TypeScript
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
import { ComponentRef, EmbeddedViewRef, NgZone, OnDestroy } from '@angular/core';
import { Subject } from 'rxjs';
import { MdcSnackbarConfig } from './snackbar-config';
export declare class MdcSnackbarContainer extends BasePortalOutlet implements OnDestroy {
private _ngZone;
snackbarConfig: MdcSnackbarConfig;
/** The portal outlet inside of this container into which the snackbar content will be loaded. */
_portalOutlet: CdkPortalOutlet;
/** Subject for notifying that the snackbar has exited from view. */
readonly _onExit: Subject<any>;
constructor(_ngZone: NgZone, snackbarConfig: MdcSnackbarConfig);
/** Attach a component portal as content to this snackbar container. */
attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
/** Attach a template portal as content to this snackbar container. */
attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
ngOnDestroy(): void;
/**
* Waits for the zone to settle before removing the element. Helps prevent
* errors where we end up removing an element which is in the middle of an animation.
*/
private _completeExit;
}