UNPKG

unserver-unify

Version:

30 lines 748 B
'use strict'; angular.module('bamboo.common').service('toastrHelper', function(toastr) { var self = this; /** * show Toastr Success dialogue * @param {string} info * @param {number} timeout * @return */ this.showToastrSuccess = function(info, timeout) { toastr.success(info, { timeOut: timeout || 1000 }); }; this.showToastrInfo = function(info, timeout) { toastr.info(info, { timeOut: timeout || 1000 }); }; this.showToastrError = function(info, timeout) { toastr.error(info, { timeOut: timeout || 1000 }); }; this.showToastrWarning = function(info, timeout) { toastr.warning(info, { timeOut: timeout || 1000 }); }; });