Toastr notification

Toastr notification

AngularJS Toaster is an AngularJS port of the toastr library. toastr is a Javascript library for non-blocking notifications. jQuery is required. The goal is to create a simple core library that can be customized and extended.

Unlike toastr, this library relies on ngAnimate and CSS3 transformations for optional animations. To include and use animations, add a reference to angular-animate.min.js and add ngAnimate as a dependency alongside toaster.

Basic example

Display a success toast, with no title

Display a warning toast with title

Display a info toast with close button

Display a error toast with close button and timeout set to 600 ms

Example usage

Add toaster container directive:


<toaster-container></toaster-container>
                    

Prepare the call of toaster method:

$scope.demo4 = function(){
        toaster.pop({
            type: 'error',
            title: 'Title example',
            body: 'This is example of Toastr notification box.',
            showCloseButton: true,
            timeout: 600
        });
    };