簡體   English   中英

如何使用Angular2 ngrx storemodule reducer(initialState)注入服務?

[英]how to use Angular2 ngrx storemodule reducer (initialState) inject service?

const initialState = {
// service.get();
}

如何保養注射減速器? 在減速機中如何使用服務? 沒有構造函數,沒有類!

export function personnelReducer(state = initialState, action: PersonnelActions.PersonnelActions) {
..........
}
  • 單獨使用減速器。
  • 對效果初始化具有射擊效果。
  • 效果電話服務。
  • 服務會返回結果。
  • 觸發動作以更新狀態。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM