I want to show multiple Snackbar on the angular website. I am using ignite UI for angular and using Snackbar from ignite.
<igx-snackbar id="snackbar1" [displayTime]="displayTime">
<div [class]="leftBorder"></div>
<div class="snackbar-detail">
<img [class]="iconType" [alt]="('LBL_CLOSE' | translate)" [src]="iconPath">
<div class="message-section">
<div class="snackbar-title">{{messageTitle}}</div>
<div class="snackbar-message">{{messageDesc}}</div>
</div>
<img (click)="closeSnackbar()" class="close-icon" [alt]="('LBL_CLOSE' | translate)"
src="assets/icons/essentials/close.svg">
</div>
</igx-snackbar>
I am able to show the snacbar using
@ViewChild(IgxSnackbarComponent, { static: true }) public igxSnackBar: IgxSnackbarComponent;
this.igxSnackBar.show();
but I want to show another snackbar so I have added id="snackbar1"
and able to get the id using
let snackbarId = this.igxSnackBar.id;
console.log(snackbarId);
but I am not able to open the particular snackbar using the id.
can anyone please help me with this?