Last active
December 30, 2020 23:04
-
-
Save rakia/bafb8c1b0a06cf20e9e2b136b2552fb7 to your computer and use it in GitHub Desktop.
Angular ChangeDetectorRef
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core'; | |
... | |
constructor(private cd: ChangeDetectorRef) {} | |
ngOnInit() { | |
this.service.dataList$.pipe(takeUntil(this._unsubscribeAll)).subscribe((data: Invoice[]) => { | |
this.dataList = data; | |
this.cd.markForCheck(); | |
}); | |
} |
Looks like the curly braces are misplaced: https://gist.github.com/plamoni/4d4ca26be2350f8c666be759745c2e1e
Thank you for the note plamoni! It's fixed now.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like the curly braces are misplaced: https://gist.github.com/plamoni/4d4ca26be2350f8c666be759745c2e1e