本文整理匯總了TypeScript中@angular/core.SimpleChanges類的典型用法代碼示例。如果您正苦於以下問題:TypeScript SimpleChanges類的具體用法?TypeScript SimpleChanges怎麽用?TypeScript SimpleChanges使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了SimpleChanges類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: ngOnChanges
ngOnChanges(changes: SimpleChanges): void {
if (changes.hasOwnProperty('event')) {
this.onEventChange(changes.event);
}
if (changes.hasOwnProperty('feltReport')) {
this.onFeltReportChange(changes.feltReport);
}
}
示例2: ngOnChanges
ngOnChanges(changes: SimpleChanges): void {
if (changes.hasOwnProperty('notifierService')) {
if (!this.notifierSubscription) {
this.subscribeToNotifier();
} else {
this.notifierSubscription.unsubscribe();
this.subscribeToNotifier();
}
}
}
示例3: ngOnChanges
ngOnChanges(changes: SimpleChanges) {
if (changes.hasOwnProperty('event')) {
this.onEvent(changes.event.currentValue);
}
}
示例4: ngOnChanges
ngOnChanges(changes: SimpleChanges): void {
if (changes.hasOwnProperty('openChildren') && !changes['openChildren'].isFirstChange()) {
this.childOpen = changes['openChildren'].currentValue.indexOf(this.rowIndex) > -1;
this.componentRef.instance.childOpen(this.childOpen);
}
}