angular ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked.

JavaScript
 constructor(private ref: ChangeDetectorRef){}

  ngAfterContentChecked() {
    this.ref.detectChanges();
  }
Source

Also in JavaScript: