Skip to content

Instantly share code, notes, and snippets.

@dlidstrom
Created October 30, 2014 06:51
Show Gist options
  • Save dlidstrom/de65b32a7881428e01b4 to your computer and use it in GitHub Desktop.
Save dlidstrom/de65b32a7881428e01b4 to your computer and use it in GitHub Desktop.
(function () {
'use strict';
angular.module('PortalModule')
.factory('Toaster', ToasterProvider);
function ToasterProvider(toaster) {
return {
success: function (title, body) {
toaster.pop('success', title, body);
},
warning: function (title, body) {
toaster.pop('warning', title, body, 10000, 'trustedHtml');
},
error: function (title, body) {
// sticky
toaster.pop('error', title, body, 0);
}
};
}
ToasterProvider.$inject = ['toaster'];
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment