我指的是router-store ngrx项目(https://github.com/ngrx/router-store)。
我不清楚如何使用这个项目...
例如,让我们从项目文档中获取以下示例:
store.dispatch(go(['/path', { routeParam: 1 }], { query: 'string' }));
这是要用作角度2路由器的替代品router.navigate(['/path...
吗?
...还是仅在某些情况下才应使用ngrx路由器存储?(如果是这样的话?)
当<a routerLink="/heroes"
单击例如角度2路由器html链接时,ngrx路由器存储也会发生什么 ?
更笼统地说,有人可以解释一下ngrx路由器存储项目与使用普通的angular 2路由器相比有什么成就吗?
或者换个说法,除了角度2路由器之外,ngrx路由器存储还带来了什么?
编辑:关于ngrx的信息和样本的有趣来源当然是ngrx example-app(https://github.com/ngrx/example-app)。
我在那找到了对路由器存储的依赖,但是我找不到在应用程序中路由器存储的位置...
仅供参考,以下是在示例应用程序中有关路由器存储的注释:
@ ngrx / router-store使路由器状态在存储中保持最新状态,并将该存储用作路由器状态的唯一真实来源。
pjmagee commentedon 24 Jul 2017
The migration guide doesnt show the alternative or best way to map actions to router navigation actions in @effects.
Is there now a new recommended approach since actions like go have been removed?