link : https://angular.io/api/core/ChangeDetectorRef
Base class that provides change detection functionality. A change-detection tree collects all views that are to be checked for changes. Use the methods to add and remove views from the tree, initiate change-detection, and explicitly mark views as dirty, meaning that they have changed and need to be re-rendered.
constructor(
private cdRef: ChangeDetectorRef,
)
getData(){
..
this.cdRef.detectChanges();
}