本文整理汇总了TypeScript中@ngrx/store.Store.dispatch方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Store.dispatch方法的具体用法?TypeScript Store.dispatch怎么用?TypeScript Store.dispatch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@ngrx/store.Store
的用法示例。
在下文中一共展示了Store.dispatch方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: tap
tap((action: BookActions.Load) => this.store.dispatch(action)),
示例2:
.subscribe((x) => {
console.log("Inactivity interval expired! Dispatching timeout event")
store.dispatch({type: ACTIVITY_TIMEOUT_OCCURRED});
});
示例3: onNewMessage
onNewMessage(input: any) {
this.store.dispatch(new SendNewMessageAction({text: input.value, threadId: this.uiState.currentThreadId,
participantId: this.uiState.userId}));
input.value = '';
}
示例4: onPhoneToJobCenter
onPhoneToJobCenter(): void {
this.store.dispatch(new PhoneToOpenedAction('jobCenter'));
}
示例5: onPhoneToCandidate
onPhoneToCandidate(): void {
this.store.dispatch(new PhoneToOpenedAction('candidate'));
}
示例6: onStartCritique
onStartCritique(assignment:Assignment) {
this.store.dispatch(startCritque(assignment));
}
示例7: onSendLink
onSendLink(): void {
this.store.dispatch(new MailToOpenedAction('sendLink'));
}
示例8: removeOne
removeOne(product){
this.store.dispatch({type:REMOVE_PRODUCT,payload:product});
}
示例9: clear
clear(product){
this.store.dispatch({type:CLEAR_PRODUCT,payload:product});
}
示例10: addTodo
addTodo(el){
let text = el.value;
this.store.dispatch({type: 'ADD_TODO', payload: {text}});
el.value = ""
}