ng2-toastr

  • Version 4.1.2
  • Published
  • No dependencies
  • ISC license

Install

npm i ng2-toastr
yarn add ng2-toastr
pnpm add ng2-toastr

Overview

bootstrap style of toast for modern angular

Index

Classes

class Toast

class Toast {}

    constructor

    constructor(type: string, message: string, title?: string, data?: Object);

      property config

      config: any;

        property data

        data: Object;

          property id

          id: number;

            property message

            message: string;

              property timeoutId

              timeoutId: any;

                property title

                title: string;

                  property type

                  type: string;

                    class ToastContainer

                    class ToastContainer implements OnDestroy {}

                      constructor

                      constructor(sanitizer: any, cdr: any, _zone: any, options: ToastOptions);

                        property animate

                        animate: string;

                          property maxShown

                          maxShown: number;

                            property messageClass

                            messageClass: string;

                              property newestOnTop

                              newestOnTop: boolean;

                                property position

                                position: string;

                                  property positionClass

                                  positionClass: string;

                                    property titleClass

                                    titleClass: string;

                                      property toasts

                                      toasts: Toast[];

                                        method addToast

                                        addToast: (toast: Toast) => void;

                                          method anyToast

                                          anyToast: () => boolean;

                                            method clicked

                                            clicked: (toast: Toast) => void;

                                              method findToast

                                              findToast: (toastId: number) => Toast | void;

                                                method ngOnDestroy

                                                ngOnDestroy: () => void;

                                                  method onAnimationEnd

                                                  onAnimationEnd: (event: any) => void;

                                                    method onEnter

                                                    onEnter: () => any;

                                                      method onExit

                                                      onExit: () => any;

                                                        method removeAllToasts

                                                        removeAllToasts: () => void;

                                                          method removeToast

                                                          removeToast: (toast: Toast) => void;

                                                            class ToastModule

                                                            class ToastModule {}

                                                              method forRoot

                                                              static forRoot: () => any;

                                                                class ToastOptions

                                                                class ToastOptions {}

                                                                  constructor

                                                                  constructor();

                                                                    property animate

                                                                    animate: string;

                                                                      property dismiss

                                                                      dismiss: string;

                                                                        property enableHTML

                                                                        enableHTML: boolean;

                                                                          property maxShown

                                                                          maxShown: number;

                                                                            property messageClass

                                                                            messageClass: string;

                                                                              property newestOnTop

                                                                              newestOnTop: boolean;

                                                                                property positionClass

                                                                                positionClass: string;

                                                                                  property showCloseButton

                                                                                  showCloseButton: boolean;

                                                                                    property titleClass

                                                                                    titleClass: string;

                                                                                      property toastLife

                                                                                      toastLife: number;

                                                                                        class ToastsManager

                                                                                        class ToastsManager {}

                                                                                          constructor

                                                                                          constructor(
                                                                                          componentFactoryResolver: any,
                                                                                          ngZone: any,
                                                                                          appRef: any,
                                                                                          options: ToastOptions
                                                                                          );

                                                                                            property container

                                                                                            container: any;

                                                                                              method clearAllToasts

                                                                                              clearAllToasts: () => void;

                                                                                                method clearToast

                                                                                                clearToast: (toast: Toast) => void;

                                                                                                  method createTimeout

                                                                                                  createTimeout: (toast: Toast) => any;

                                                                                                    method custom

                                                                                                    custom: (message: string, title?: string, options?: any) => Promise<Toast>;

                                                                                                      method dismissToast

                                                                                                      dismissToast: (toast: Toast) => void;

                                                                                                        method dispose

                                                                                                        dispose: () => void;

                                                                                                          method error

                                                                                                          error: (message: string, title?: string, options?: any) => Promise<Toast>;

                                                                                                            method info

                                                                                                            info: (message: string, title?: string, options?: any) => Promise<Toast>;

                                                                                                              method onClickToast

                                                                                                              onClickToast: () => any;

                                                                                                                method setRootViewContainerRef

                                                                                                                setRootViewContainerRef: (vRef: any) => void;

                                                                                                                  method setupToast

                                                                                                                  setupToast: (toast: Toast, options?: any) => Toast;

                                                                                                                    method show

                                                                                                                    show: (toast: Toast, options?: Object) => Promise<Toast>;

                                                                                                                      method success

                                                                                                                      success: (message: string, title?: string, options?: any) => Promise<Toast>;

                                                                                                                        method warning

                                                                                                                        warning: (message: string, title?: string, options?: any) => Promise<Toast>;

                                                                                                                          Package Files (6)

                                                                                                                          Dependencies (0)

                                                                                                                          No dependencies.

                                                                                                                          Dev Dependencies (33)

                                                                                                                          Peer Dependencies (0)

                                                                                                                          No peer dependencies.

                                                                                                                          Badge

                                                                                                                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/ng2-toastr.

                                                                                                                          • Markdown
                                                                                                                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/ng2-toastr)
                                                                                                                          • HTML
                                                                                                                            <a href="https://www.jsdocs.io/package/ng2-toastr"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>