reactive-angular-course icon indicating copy to clipboard operation
reactive-angular-course copied to clipboard

ExpressionChangedAfterItHasBeenCheckedError

Open majidmadadi opened this issue 4 years ago • 1 comments

I was following your course and I faced a problem. When creating loading component using completely reactive pattern, I get the "ExpressionChangedAfterItHasBeenCheckedError" error. I have reproduced the error in here.

I think it's an angular bug. What do you think?

majidmadadi avatar Jul 13 '20 09:07 majidmadadi

You need only to set the change detection method of your component, for more details, check this link: https://www.digitalocean.com/community/tutorials/angular-change-detection-strategy

@Component({
  selector: 'my-app',
  template: `...`,
  changeDetection: ChangeDetectionStrategy.OnPush
})

rafaelblink avatar Aug 20 '20 04:08 rafaelblink