本文整理汇总了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);
}