Closed destus90 closed 7 years ago
makeToastyNotification(type: string, title: string, msg: string) {
const toastOptions: ToastOptions = {title, msg} as ToastOptions;
this.toastyService[type](toastOptions);
this.cd.markForCheck();
setTimeout(() => {
this.cd.markForCheck();
}, this.toastyConfig.timeout);
}
help me. Close.
Does it real to use ng2-toasty with ChangeDetectionStrategy.OnPush? When i use OnPush, the message doesn`t dissappear after timeout. I inject ChangeDetectorRef service in your code , call ref.detectChanges() and everything was OK, but AoT fail.