簡體   English   中英

NGRX Redux存儲 - 只選擇一個狀態切片返回'undefined',即使intellisense自動完成並且模型中的所有內容都匹配

[英]NGRX Redux store — selecting only a slice of the state returns 'undefined' even if intellisense autocompletes and everything in the model matches

使用@ ngrx-redux / store,最新版本。 我可以通過字符串選擇狀態的任何切片。 當我嘗試訪問屬性時,它返回“未定義”錯誤。

句法:

this.loadedClients = this.store.select(
      state => state.superUser.loadedClients
    );

運用

this.loadedClients = this.store.select('superUser')

工作,但使用異步管道來獲取loadedClients屬性會導致凌亂的標記。

我在Google或文檔中找不到示例。

我的減速機內部的一個問題搞亂了這個屬性 - 它應該根本不起作用。

暫無
暫無

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

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