/** * data service * * @module app/common/services/toastService * @exports toastService * @name toastService */ window.angular && (function(angular) { 'use strict'; angular.module('app.common.services').service('toastService', [ 'ngToast', '$sce', function(ngToast, $sce) { function initToast( type = 'create', title = '', message = '', dismissOnTimeout = false) { const iconStatus = type === 'success' ? 'on' : type === 'danger' ? 'error' : type === 'warning' ? 'warn' : null; const content = $sce.trustAsHtml(`
${message}