Skip to content
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

Implement ChangeDetectorRef to Address ExpressionChangedAfterItHasBeenCheckedError #1367

Conversation

mauroalexandre
Copy link
Contributor

This pull request introduces the use of ChangeDetectorRef across critical components in our Angular application to manually manage change detection. This change is aimed at resolving the persistent ExpressionChangedAfterItHasBeenCheckedError encountered during asynchronous data updates.

Changes Made

  • Integration of ChangeDetectorRef: ChangeDetectorRef has been injected into components that are susceptible to asynchronous state changes, such as those subscribing to data services or external events.
  • Manual Triggering of Change Detection: Added this.cdr.detectChanges() calls immediately following updates to component state variables in asynchronous operations, ensuring that the view updates are in sync with the latest data.

@unocelli
Copy link
Member

Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants