After downloading the angular-toaster.d.ts file from Nuget and setting up a notification service, everything seems error-free, but the notification service is not functioning as expected.
export class notificationService {
constructor(private toaster: ngtoaster.IToasterService) {
debugger;
// this.toaster.toast.timeout = 3000;
// this.toaster.toast.type = EnergyTechApp.Entity.Constants.info;
// this.toaster.toast.showCloseButton = true;
}
displaySuccess(message: string) {
debugger;
this.toaster.success(message); /// not working Not displaying anything
this.toaster.success("", "", 122, ""); // this is a overload
}
}
Questions arise about the overloading in the d.ts file, as it is unclear what parameters should be utilized:
success(title?:string,
body?:string,
timeout?:number,
bodyOutputType?:string,
clickHandler?:EventListener,
toasterId?:number): void
Specifically, the confusion lies in understanding the clickHandler parameter and its necessity for the toaster to function properly.