Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
popToastFromObject() {
var toast: Toast = {
type: 'info',
title: 'Test Title',
body: 'Test Body',
onHideCallback: () => console.log(toast.title + ' was closed!')
}
var toast2: Toast = {
type: 'success',
title: 'Yay',
body: TestComponent,
bodyOutputType: BodyOutputType.Component
}
var toast3: Toast = {
type: 'success',
title: 'close button',
showCloseButton: true
};
this.toasterService.pop(toast);
this.toasterService.pop(toast2);
this.toasterService.pop(toast3);
}