Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
title = 'HI there!';
content = `I'm cool toaster!`;
types: NbComponentStatus[] = [
'success',
'info',
'warning',
'danger',
'primary',
];
positions: string[] = [
NbGlobalPhysicalPosition.TOP_RIGHT,
NbGlobalPhysicalPosition.TOP_LEFT,
NbGlobalPhysicalPosition.BOTTOM_LEFT,
NbGlobalPhysicalPosition.BOTTOM_RIGHT,
NbGlobalLogicalPosition.TOP_END,
NbGlobalLogicalPosition.TOP_START,
NbGlobalLogicalPosition.BOTTOM_END,
NbGlobalLogicalPosition.BOTTOM_START,
];
quotes = [
{ title: null, body: 'We rock at Angular' },
{ title: null, body: 'Titles are not always needed' },
{ title: null, body: 'Toastr rock!' },
];
makeToast() {
this.showToast(this.status, this.title, this.content);
}
openRandomToast () {
showToast() {
this.toastrService.show(
`Toast number ${this.i}`,
`Toast with the limit`,
{ limit: 3, position: NbGlobalLogicalPosition.TOP_END });
this.i++;
}
}