angular2-toaster
- Version 11.0.1
- Published
- 363 kB
- 1 dependency
- MIT license
Install
npm i angular2-toasteryarn add angular2-toasterpnpm add angular2-toasterOverview
An Angular Toaster Notification library based on AngularJS-Toaster
Index
Variables
Classes
Interfaces
Enums
Type Aliases
Variables
variable DefaultIconClasses
const DefaultIconClasses: { success?: string; info?: string; warning?: string; wait?: string; error?: string;};variable DefaultTypeClasses
const DefaultTypeClasses: { success?: string; info?: string; warning?: string; wait?: string; error?: string;};variable ɵa
const ɵa: any[];Classes
class ɵb
class ToastComponent implements OnInit, AfterViewInit, OnDestroy {}constructor
constructor( componentFactoryResolver: ComponentFactoryResolver, changeDetectorRef: ChangeDetectorRef, ngZone: NgZone, element: ElementRef, renderer2: Renderer2);property bodyOutputType
bodyOutputType: typeof BodyOutputType;property clickEvent
clickEvent: EventEmitter<any>;property componentBody
componentBody: ViewContainerRef;property messageClass
messageClass: string;property progressBarWidth
progressBarWidth: number;property removeToastEvent
removeToastEvent: EventEmitter<Toast>;property titleClass
titleClass: string;property toast
toast: Toast;property toasterconfig
toasterconfig: ToasterConfig;method click
click: (event: MouseEvent, toast: Toast) => void;method ngAfterViewInit
ngAfterViewInit: () => void;method ngOnDestroy
ngOnDestroy: () => void;method ngOnInit
ngOnInit: () => void;method restartTimer
restartTimer: () => void;method stopTimer
stopTimer: () => void;class ɵc
class TrustHtmlPipe implements PipeTransform {}constructor
constructor(sanitizer: DomSanitizer);method transform
transform: (content: any) => SafeHtml;class ToasterConfig
class ToasterConfig implements IToasterConfig {}constructor
constructor(configOverrides?: IToasterConfig);property animation
animation: string;property bodyOutputType
bodyOutputType: BodyOutputType;property bodyTemplate
bodyTemplate: string;property closeHtml
closeHtml: string;property defaultToastType
defaultToastType: ToastType;property iconClasses
iconClasses: { success?: string; info?: string; warning?: string; wait?: string; error?: string;};property limit
limit?: number;property messageClass
messageClass: string;property mouseoverTimerStop
mouseoverTimerStop: boolean;property newestOnTop
newestOnTop: boolean;property positionClass
positionClass: string;property preventDuplicates
preventDuplicates: boolean;property showCloseButton
showCloseButton: | boolean | { success?: boolean; info?: boolean; warning?: boolean; wait?: boolean; error?: boolean; };property tapToDismiss
tapToDismiss: boolean;property timeout
timeout: | number | { success?: number; info?: number; warning?: number; wait?: number; error?: number; };property titleClass
titleClass: string;property toastContainerId
toastContainerId?: number;property typeClasses
typeClasses: { success?: string; info?: string; warning?: string; wait?: string; error?: string;};class ToasterContainerComponent
class ToasterContainerComponent implements OnInit, OnDestroy {}constructor
constructor(toasterService: ToasterService);property toasterconfig
toasterconfig: ToasterConfig;property toasts
toasts: Toast[];method childClick
childClick: ($event: any) => void;method click
click: (toast: Toast, isCloseButton?: boolean) => void;method ngOnDestroy
ngOnDestroy: () => void;method ngOnInit
ngOnInit: () => void;method removeToast
removeToast: (toast: Toast) => void;class ToasterModule
class ToasterModule {}class ToasterService
class ToasterService {}constructor
constructor();Creates an instance of ToasterService.
property addToast
addToast: Observable<Toast>;property clearToasts
clearToasts: Observable<IClearWrapper>;property removeToast
removeToast: Observable<IClearWrapper>;method clear
clear: (toastId?: string, toastContainerId?: number) => void;Clears a toast by toastId and/or toastContainerId.
Parameter toastId
The toastId to clear.
Parameter toastContainerId
The toastContainerId of the container to remove toasts from.
method pop
pop: (type: ToastType | Toast, title?: string, body?: string) => Toast;Synchronously create and show a new toast instance.
Parameter type
The type of the toast, or a Toast object.
Parameter title
The toast title.
Parameter body
The toast body.
Returns
{Toast} The newly created Toast instance with a randomly generated GUID Id.
method popAsync
popAsync: ( type: ToastType | Toast, title?: string, body?: string) => Observable<Toast>;Asynchronously create and show a new toast instance.
Parameter type
The type of the toast, or a Toast object.
Parameter title
The toast title.
Parameter body
The toast body.
Returns
{Observable} A hot Observable that can be subscribed to in order to receive the Toast instance with a randomly generated GUID Id.
Interfaces
interface IClearWrapper
interface IClearWrapper {}property toastContainerId
toastContainerId?: number;property toastId
toastId?: string;interface IToasterConfig
interface IToasterConfig {}property animation
animation?: string;property bodyOutputType
bodyOutputType?: BodyOutputType;property bodyTemplate
bodyTemplate?: string;property closeHtml
closeHtml?: string;property defaultToastType
defaultToastType?: ToastType;property iconClasses
iconClasses?: { [key in ToastType]?: string;};property limit
limit?: number | null;property messageClass
messageClass?: string;property mouseoverTimerStop
mouseoverTimerStop?: boolean;property newestOnTop
newestOnTop?: boolean;property positionClass
positionClass?: string;property preventDuplicates
preventDuplicates?: boolean;property showCloseButton
showCloseButton?: | boolean | { [key in ToastType]?: boolean; };property tapToDismiss
tapToDismiss?: boolean;property timeout
timeout?: | number | { [key in ToastType]?: number; };property titleClass
titleClass?: string;property toastContainerId
toastContainerId?: number | null;property typeClasses
typeClasses?: { [key in ToastType]?: string;};interface Toast
interface Toast {}property body
body?: any;property bodyOutputType
bodyOutputType?: BodyOutputType;property closeHtml
closeHtml?: string;property data
data?: any;property onClickCallback
onClickCallback?: OnActionCallback;property onHideCallback
onHideCallback?: OnActionCallback;property onShowCallback
onShowCallback?: OnActionCallback;property progressBar
progressBar?: boolean;property progressBarDirection
progressBarDirection?: ProgressBarDirection;property showCloseButton
showCloseButton?: boolean;property tapToDismiss
tapToDismiss?: boolean;property timeout
timeout?: number;property title
title?: string;property toastContainerId
toastContainerId?: number;property toastId
toastId?: string;property type
type: ToastType;Enums
enum BodyOutputType
enum BodyOutputType { Default = 0, TrustedHtml = 1, Component = 2,}Type Aliases
type OnActionCallback
type OnActionCallback = (toast: Toast) => void;type ProgressBarDirection
type ProgressBarDirection = 'decreasing' | 'increasing';type ToastType
type ToastType = 'success' | 'info' | 'warning' | 'wait' | 'error';Package Files (11)
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (4)
Badge
To add a badge like this oneto 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/angular2-toaster.
- Markdown[](https://www.jsdocs.io/package/angular2-toaster)
- HTML<a href="https://www.jsdocs.io/package/angular2-toaster"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 1381 ms. - Missing or incorrect documentation? Open an issue for this package.
