本文整理匯總了TypeScript中@angular/core.EventEmitter類的典型用法代碼示例。如果您正苦於以下問題:TypeScript EventEmitter類的具體用法?TypeScript EventEmitter怎麽用?TypeScript EventEmitter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了EventEmitter類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: setTimeout
setTimeout(() => ret.emit(false), 250);
示例2:
return this.storage.get('items').then((items) => {
items.push(item);
this.refreshList$.emit(items);
return this.storage.set('items', items);
});
示例3: updateValue
updateValue(value: string|Array<string>): void {
this.model.selected = value;
this.selectValueChange.emit(this.model);
}
示例4: toggleFolder
// I emit a toggle event for the given folder.
// --
// CAUTION: This method may be invoked due to a local toggle action; or, as part of
// the bubbling-up of a toggle action in a nested folder. In order to follow a one-
// way data-flow, all toggle requests are bubbled-up instead of being applied
// directly to the local view-state.
public toggleFolder( target: Folder ) : void {
this.toggleFolderEvents.emit( target );
}
示例5: setSharedMessage
setSharedMessage(message: string) {
this.sharedMessage = message;
this.messageChangedEvent.emit('');
}
示例6: showSidebar
public showSidebar(value: any) {
this.sidebardShow$.emit(value);
}
示例7:
_onPressUp(event:HammerInput): void {
this.onPressUp.emit(event);
}
示例8: delVote
delVote(): void {
this.delete.emit(this.vote);
}
示例9: rateUp
rateUp() {
this.book.rateUp();
this.rated.emit(this.book);
}