angular 9打造用户系统 - 7使用ngrx router store管理路由
本篇要做什么
本系列最后一篇
本文将使用ngrx router store来绑定angular路由到ngrx,同事使用CustomRouteStateSerializer
github代码:https://github.com/shyandsy/angular-9-ngrx-user-mamagement
原教程视频连接
https://www.youtube.com/watch?v=XHw4hYkGsHM&list=PLaMbwDs23r4KXoMucJEyUAvamQ-kFNBvC&index=9
安装文档文档位置
https://github.com/ngrx/platform/tree/master/docs/router-store
安装
npm install @ngrx/router-store --save
新建src\app\shared\utils.ts, customer-route-state-serializer。这段代码是上面文档提供的
import { StoreModule, ActionReducerMap } from "@ngrx/store";
import { Params, RouterStateSnapshot} from '@angular/router';
import { RouterStateSeria...