本文整理匯總了TypeScript中angular2/core.ChangeDetectorRef類的典型用法代碼示例。如果您正苦於以下問題:TypeScript ChangeDetectorRef類的具體用法?TypeScript ChangeDetectorRef怎麽用?TypeScript ChangeDetectorRef使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ChangeDetectorRef類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: isValid
public isValid() : boolean {
this.changeDetector.detectChanges();
return this.invoiceForm.valid
&& this.invoice.items.length !== 0
&& this.itemsArray.valid;
}
示例2:
this.lib.getLibrary().subscribe((songs: Song[]) => {
this.songs = songs;
this.cd.detectChanges();
});
示例3:
this.iconSub = this.fonticon.getCss(collectionName).subscribe((data: any) => {
this.value = data[className];
this._ref.markForCheck();
});
示例4: onAppStoreUpdate
onAppStoreUpdate() {
this.changeDetectorRef.markForCheck();
}
示例5: onAppStoreUpdate
onAppStoreUpdate() {
this.issues = this.appStore.getState().issues;
this.changeDetectorRef.markForCheck();
}
示例6: onForceDetection
private onForceDetection(){
this.ref.markForCheck();
console.log('cd completed')
}
示例7: setInterval
setInterval(() => {
this.ref.markForCheck();
}, intervalMsec);
示例8:
this.invoiceService.getInvoice(this.id).subscribe((invoice:Invoice) => {
this.invoice = invoice;
this.changeDetector.detectChanges();
});