I strongly suggest to use this library to achieve bidirectional binding both for reading and writing query params: @geckosoft/ngx-query-params
It's very useful when you are trying to read/write i.e. pagination params from URL query params, in just a one-line code.
Might be useful to someone! 🙂