Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plamoni/4d4ca26be2350f8c666be759745c2e1e to your computer and use it in GitHub Desktop.
Save plamoni/4d4ca26be2350f8c666be759745c2e1e to your computer and use it in GitHub Desktop.
Angular ChangeDetectorRef
import { ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';
...
constructor(private cd: ChangeDetectorRef) {
this.service.dataList$.pipe(takeUntil(this._unsubscribeAll))
.subscribe((data: Invoice[]) => {
this.dataList = data;
this.cd.markForCheck();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment