Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Tips & Trick

Phat Tran edited this page Sep 25, 2018 · 1 revision

Tips & Tricks

Some tips or tricks might help you develop smoothly or easily for some cases :D

Toaster

I use noty toaster and add it globally in window, feel free to use it if you want.

Here is a special library for noty which I re-structure for ease of use. Access via:

// window
window.SethPhatToaster.method()

// or
SethPhatToaster.method()

// demo
SethPhatToaster.success("Hello World");

Available methods:

Method Parameters Description
SethPhatToaster.success string message
function afterClose
object customOptions
Show success message toaster
SethPhatToaster.error string message
function afterClose
object customOptions
Show error message toaster
SethPhatToaster.warning string message
function afterClose
object customOptions
Show warning message toaster
SethPhatToaster.info string message
function afterClose
object customOptions
Show info message toaster