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