ngrx / platform

Reactive State for Angular
https://ngrx.io
Other
8.01k stars 1.97k forks source link

Provide properly typed selectors example for CustomSerializer #4301

Open moniuch opened 5 months ago

moniuch commented 5 months ago

Information

When following the instructions for creating a custom serializer, there is no explanation how to provide custom selectors for the returned properties { url, params, queryParams } (as the default ones provided by getRouterSelectors cease to work). It's maybe not that hard to write code that works, the intimidating part for a lot of users might be the proper TS typing.

A good accompanying selectors example for this serializer would be gold. Thank you.

Documentation page

https://ngrx.io/guide/router-store/configuration#custom-router-state-serializer

I would be willing to submit a PR to fix this issue