Toaster Module Name: ToasterModule

Module Name: ToasterModule

Toasters are message service components with bunch of features that be customized.

Showcase
Toaster Configuration
Position
Title
Message
Width
px
Height
px
Time
ms
Making it Work

Step One

First of all, you must inject the ToasterServicein the constructor
constructor( private toasterService: ToasterService ) {}

Step Two

Create a method that call the Toaster that will wish. For example: Calling the success Toaster.
Allowed Toaster Methods
this.toasterService.success(object?)
this.toasterService.danger(object?)
this.toasterService.information(object?)
this.toasterService.warning(object?)
clickMethod() {
  this.toasterService.success({
        title: 'My title',
        message: 'My test message',
        position: 'top-right',
        width: '400px',
        height: '70px',
        progress: true,
        showIcon: true,
        time: 3000,
  });
}
As parameter, you may have to pass the toaster config object.
Properties
NameTypeDefaultDescriptionOptions
heightstring70pxThe Toaster height. px | % | em
messagestringMessage DescriptionThe description of toaster any text
positionstringtop-rightSet the position of toaster. top-left | top-center | top-right | bottom-left | bottom-center | bottom-right
progressbooleanfalseControls whether the progressbar will be shown or not true | false
showIconbooleantrueControls whether the icon will be shown or not true | false
timenumber3000The time that toaster will be visible. milliseconds
titlestringTitle !The title of toaster any text
widthstring400pxThe Toaster width. px | % | em