Hi Tuariq,
Greetings from Syncfusion support.
By default, a unique ID is automatically generated based on
the show method called in the Toast component. Please find the below screenshot
for your reference.

Your shared code passed the id attribute inside
the Toast show method. But, in our Toast component, it does not have an id
attribute inside the show method and an automatically generated id based on the
show method. Based on the content, we suggest removing the duplicate toast. In
the below sample, we have compared the already created toast content with the
current need to create the toast content using the beforeOpen event. If
it's already been created, remove the already created toast and generate a new
one.
app.component.html
|
<ejs-toast #element [position]='position' (beforeOpen)="onBeforeOpen($event)">
</ejs-toast>
|
app.component.ts
|
onBeforeOpen(e: ToastBeforeOpenArgs) {
for (let i =0; i < this.element.element.querySelectorAll('.e-toast-content').length; i++) {
if (e.options?.content == this.element.element.querySelectorAll('.e-toast-content')[i].innerHTML) {
this.element.element.querySelectorAll('.e-toast')[i].remove();
}
}
}
|
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Toast411196788
You can also prevent the duplicate creation of the
Toast component. Please see below for the documentation.
Documentation: https://ej2.syncfusion.com/angular/documentation/toast/how-to/prevent-duplicate-toast-display/
Please let us know if you have any other concerns.
Regards,
Buvana S