akserg / ng2-toasty

Angular2 Toasty component shows growl-style alerts and messages for your app.
MIT License
283 stars 102 forks source link

Feature : Timeout independent toast + support for multiple line messages #36

Closed uzumakinaruto123 closed 8 years ago

uzumakinaruto123 commented 8 years ago
akserg commented 8 years ago

Set the timeout equals 0 or null to prevent autoclose in ToastOptions or ToastConfig:

var toastOptions:ToastOptions = {
            title: "My title",
            msg: "The message",
            showClose: true,
            timeout: null, // <!-- Here is your changes
            theme: 'default',
            onAdd: (toast:ToastData) => {
                console.log('Toast ' + toast.id + ' has been added!');
            },
            onRemove: function(toast:ToastData) {
                console.log('Toast ' + toast.id + ' has been removed!');
            }
        };