Angular $scope.$apply()的等价物是什么;用角字体?

Angular $scope.$apply()的等价物是什么;用角字体?,angular,Angular,更改mat table对象的.filteredata属性后,我需要以某种方式刷新该表并更新其内容 我知道您可以通过$scope.$apply()来实现这一点,但是在角度TS中呢 我想你在找 通常这是由Angulars change detection完成的,其区域会通知Angulars change detection应该进行更改检测 export class FooComponent implements OnInit{ constructor (private _services: S

更改mat table对象的
.filteredata
属性后,我需要以某种方式刷新该表并更新其内容


我知道您可以通过
$scope.$apply()
来实现这一点,但是在角度TS中呢

我想你在找

通常这是由Angulars change detection完成的,其区域会通知Angulars change detection应该进行更改检测

export class FooComponent implements OnInit{
   constructor (private _services: Services, private cdRef:ChangeDetectorRef) {
   this.cdRef.detectChanges();
}

完美的谢谢