本文整理汇总了TypeScript中esp-js.observeEvent函数的典型用法代码示例。如果您正苦于以下问题:TypeScript observeEvent函数的具体用法?TypeScript observeEvent怎么用?TypeScript observeEvent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了observeEvent函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
@observeEvent(EventConst.STORY_SELECTED)
_onStorySelected(event) {
this._selectedStory = event.story;
this._allStories.forEach(story => {
story.isSelected = story === event.story;
});
}
示例2: _onAddEpic
@observeEvent(EventConst.ADD_EPIC)
_onAddEpic() {
this._createEpicDialog.resultsStream
.streamFor(this.modelId)
.take(1)
.subscribe(results => {
if (results.type === ItemNameDialogResultType.Saved) {
let epic = new Epic(this.modelId, this.router, this._createStoryDialog, results.name);
epic.observeEvents();
this._epics = this._epics.push(epic);
}
this._createEpicDialog.close();
});
this._createEpicDialog.open();
}
示例3:
@observeEvent(EventConst.DONE_STORY, storyEventPredicate)
_onDoneStory() {
this._status = StoryStatus.DONE;
}
示例4: _onSaved
@observeEvent(EventConst.ITEM_NAME_SAVED)
private _onSaved(event) {
let name = this.itemName;
this._reset();
this._resultsSubject.onNext({type: ItemNameDialogResultType.Saved, name: name});
}