I have used the syncfusion Angular Toast utility service like this
import{ToastUtility}from'@syncfusion/ej2-notifications';
import{ToastComponent}from'@syncfusion/ej2-angular-notifications';
export class OrderComponent{
constructor(private orderService:OrderService){}
OnSaveOrderAction(e: any){
this.orderService.saveOrder(this.Order).subscribe((ret)=>{
this.toastObj =ToastUtility.show({
title:'Saved',
content:'Saved Successfully !!!',
timeOut:20000,
position:{ X:'Right', Y:'Top'},
showCloseButton:true
},'Success',20000) as ToastComponent;
});
}
}
but I am getting an error like this .'Toast' is missing the following properties from type 'ToastComponent': ngEle, srenderer, viewContainerRef, injector, and 10 more.
when I define it as an unknown object, the error goes. but the success green color is not showing then.
solution -
this.toastObj = ToastUtility.show({
title: 'Saved',
content: 'Saved Successfully !!!',
timeOut: 20000,
position: { X: 'Right', Y: 'Top' },
showCloseButton: true
}, 'Success', 20000) as unknown as ToastComponent;Note
1 I am using the version of "@syncfusion/ej2-angular-navigations": "^25.1.35"
how can I fix this issue ?