angular-university / reactive-angular-course

How to build Angular applications in Reactive style using plain RxJs - Patterns and Lightweight state management

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ExpressionChangedAfterItHasBeenCheckedError

majidmadadi opened this issue · 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?

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
})