Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

toast duplicate angular

if (this.toasterconfig.preventDuplicates && this.toasts.length > 0) {
  if (toast.toastId && this.toasts.some(t => t.toastId === toast.toastId)) {
    return;
  } else if (this.toasts.some(t => t.body === toast.body)) {
    return;
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #toast #duplicate #angular
ADD COMMENT
Topic
Name
2+7 =