默认情况下:
@Component({
changeDetection:changeDetectionStrategy.Default
})
onPush:就是不用来检查当前组件,
markForCheck:表示在某个点上过来检查;this.cd.markForCheck(); //cd: changeDetectorRef
默认情况下:
@Component({
changeDetection:changeDetectionStrategy.Default
})
markForCheck:表示在某个点上过来检查;this.cd.markForCheck(); //cd: changeDetectorRef