Toastr http://codeseven.github.io/toastr

Simple javascript toast notifications.


Usage


require(['jquery', 'px-libs/toastr'], function($, toastr) {
  ...
});
        

Usage

To use toastr plugin, you need to include the next scripts:


<script src="path/to/js/libs/toastr.js"></script>
<script src="path/to/js/pixeladmin/directives/angular-toastr.js"></script>
        

Then inject the plugin into your angular application:

angular.module('yourApp', ['toastr']);

Alternatively, you can include toastr plugin using ocLazyLoad plugin:


$ocLazyLoad.load([
  {
    name: 'toastr',
    files: [
      'path/to/js/libs/toastr.js',
      'path/to/js/pixeladmin/directives/angular-toastr.js',
    ],
  },
]);
        

$toastr service

Inject $toastr service into a controller to create notifications. By default it comes with eight methods (see the plugin's documentation):

  |