Type Parameters

Hierarchy

Constructors

constructor

  • new BaseDismissibleToastService<P, C>(): BaseDismissibleToastService<P, C>
  • Type Parameters

    • P extends BaseToastDurationDismissibleConfig<any>

    • C extends BaseToastDurationDismissibleContainerComponent<P> = BaseToastDurationDismissibleContainerComponent<P>

    Returns BaseDismissibleToastService<P, C>

Properties

Protected Abstract defaultConfig

defaultConfig: P

Toast default config.

Protected Abstract toastContainerComponent

toastContainerComponent: Type<C>

Component for Toast Container.

Protected Abstract toastDataInjectionToken

toastDataInjectionToken: InjectionToken<any>

Injection token for Toast Data.

Protected Abstract toastPositionStrategy

toastPositionStrategy: BaseToastPosition

Toast Position Strategy.

Protected Abstract toastTextComponent

toastTextComponent: Type<ToastTextComponent>

Component for simple text toast.

Methods

Protected animateToast

  • animateToast<T>(toastRef): void

Protected attachToastContainerComponent

  • attachToastContainerComponent(overlayRef, config): C

Protected createContentComponentInjector

  • createContentComponentInjector<T>(config, toastRef): Injector

Protected Abstract getContainerComponentProviders

  • getContainerComponentProviders(config): StaticProvider[]

Protected Abstract getContentComponentProviders

  • getContentComponentProviders<T>(config, toastRef): StaticProvider[]

Protected Abstract getToastRef

  • getToastRef<T>(containerRef, overlayRef, positionStrategy): BaseToastRef<EmbeddedViewRef<any> | T, P, ToastContainerComponent<P>>
  • Creates Toast Reference for provided container and overlay.

    Type Parameters

    • T

    Parameters

    • containerRef: C

      Container reference.

    • overlayRef: OverlayRef

      Overlay Reference.

    • positionStrategy: BaseToastPosition

      Position Strategy

    Returns BaseToastRef<EmbeddedViewRef<any> | T, P, ToastContainerComponent<P>>

hasOpenMessageToasts

  • hasOpenMessageToasts(): boolean

hideAll

  • hideAll(): void

Abstract open

  • open<T>(toast): BaseToastRef<ToastTextComponent | T | EmbeddedViewRef<T>, P, ToastContainerComponent<P>>
  • Opens a Toast with the provided configuration.

    Type Parameters

    • T

    Parameters

    • toast: string | Type<T> | TemplateRef<T>

      accepts string, Component or TemplateRef.

    Returns BaseToastRef<ToastTextComponent | T | EmbeddedViewRef<T>, P, ToastContainerComponent<P>>

Abstract openFromComponent

  • openFromComponent<T>(component, config): BaseToastRef<T, P, ToastContainerComponent<P>>

Abstract openFromString

  • openFromString(message, config): BaseToastRef<ToastTextComponent, P, ToastContainerComponent<P>>

Abstract openFromTemplate

  • openFromTemplate(template, config): BaseToastRef<EmbeddedViewRef<any>, any, ToastContainerComponent<any>>

setNewPositionStrategy

  • setNewPositionStrategy(newStrategy): void