[英]NGRX | store.select(state => state.MyObject) | returns undefined
[英]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.