-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error using Zoneless change detection #1015
Comments
After looking at the source code I guess it's due to the use of NgZone in the. toastr.component.ts file. |
Back again - sorry for the spam. I actually think the reason is that , due to Angular/Fire issues, we had to keep ZoneJS in the angular.json polyfills, and still use the zoneless change detector. For some reason this seems to mean ngx-toastr thinks ZoneJS is present, even though there is no change detection running. Would it be a big task to make wether to use zoneJS or not, a configuration setting when providing the module? |
I think the best approach is fully remove Zone.js dependency from ngx-toastr As Angular moves towards a zoneless application development model, Zone.js is no longer accepting new features, including additional patches for native platform APIs. |
@kemotx90 I agree. In the mean time I switch to https://www.npmjs.com/package/@ngneat/hot-toast which doesn't use zone at all |
Hi, Angular team member here. This isn’t related to the component’s use of The error message indicates that issue is the toast component is not following the rules of
This is a pretty straightforward fix: use signals for state read in templates or call remember to call ChangeDetectorRef.markForCheck when updating the state. |
zone.js is under deprecation by the angular team. |
@scttcper thanks for quick response! great! cheers! |
thanks @junglerobba for taking this on! |
Hi,
Error: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value for 'display': 'none'. Current value: 'undefined'. Expression location: _Toast component.
Any ideas what it could be? Thanks
As soon as I enable normal zoneJs again, it works without errors
The text was updated successfully, but these errors were encountered: