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