如何仅从商店获得最后值?
这是我的选择器的使用: - private loadTree() { this.loading = true; this.store.select(transitionListSelector).pipe().subscribe(data => { cons…
NGRX还原器集数组到对象内的内部
我的存储对象结构如下所示, { "fooObject":[ { "id":1, "somefield":"bla bla", "orderArray":[ { "id":1, "somefield":"a" }, { "id":2, "somefield…
在ngrx状态中保存快照文档会引发错误:无法冻结
我正在使用Firebase创建一个分页系统,为此,我必须将文档传递到“ ostageafter()”函数的“@angular/fir/compat/firestore”库。 在我的应用程序中…
NGRX在转到HTTPS之前将怪异的重定向重定向到HTTP
我是NGRX的新手,我想使用NGRX数据模块。我与Traefik(HTTPS模式)在Docker中托管的Angular/Symfony堆叠在一起。 我想向名为: https://xxx.xxxxxxxx…
NGRX商店运行时检查NGZONE在Android上失败
我们在网上和离线窗口事件中实现了网络检查作为副作用。 online$ = createEffect(() => { return fromEvent(window, 'online').pipe(mapTo(NetworkAct…
用auth0s authguard配置角路由
我想配置嵌套的懒惰加载路线,只有在用户登录时才可用。身份验证可与Auth0s一起使用,并且是相应的authguard。 因此,例如,我的路线看起来像这样: c…
如何使用NGRX保存到本地存储?
我正在尝试保存一个简单的菜单状态,无论是“打开”还是“关闭”到浏览器localstorage。我知道我可以使用 localstorage.setitem 来做到这一点。但是,…
直接从NGRX商店读取数据
我在代码库中看到了很多使用此模式的地方, getUrl() : string { let url = '' this.store.pipe(selectorConfig, take(1)).subscribe((config) => { u…
找不到模块'@ngrx/效果'开玩笑进行测试时
当尝试在我们的角度应用程序中使用jest进行测试时,我会收到以下消息: Cannot find module '@ngrx/effects' from 'src/app/modules/core/core.module…
ngrx选择返回存储不是值
catalogueselection in Store Image 我在state(catalogueSelection)中需要数据并需要将字符串的“ searchTextresult”传递到一个组件中,而“ anda…
当销毁组件后,订阅未订阅时,最新值未能使用最新值
parent component.html 子component.ts @UntilDestroy() @Component({ selector: 'child-component', templateUrl: './child-component.html', styleU…