On query parameters change, route is not updating

The ngOnInit() has to be re-invoked when query parameter is updated. This can be achieved as follow:

import { Router } from '@angular/router';
constructor(private router: Router) {
   this.router.routeReuseStrategy.shouldReuseRoute = () => false;
}

I had this problem once. Can you put some code, or solutions you tried? I'll give you something working for me, but you better give me some more details so that I can help. Supposing we are here : some_url/deposits-withdrawals and we wish to navigate , changing only parameters.

    let url = "id=2&num=12321344"
    this.router.navigate(['../', url], { relativeTo: this.route });

Hope it helps :/

=================================== EDIT==================================

You have to detect that query parameters have changed. And for that, you may add a listener to queryParameters changings in the constructor of your component. This can be done using your router this way :

    constructor(route:ActivatedRoute) { 
        route.queryParams.subscribe(val => { 
            // put the code from ngOnInit here 
        }); 
    }

Adding this listener to detect query parameters changes, means you have to move your code from ngOnInit function to this listener. And every time, you navigate, it will be called.

For navigating, you may use html navigation, or ts navigation. If you want it to be in html, you may use :

    <button routerLink="/deposits-withdrawals" [queryParams]="{ type: 'withdrawal' ,'productId': selectedBalance.ProductId }" class="wallet-btns">WITHDRAW {{selectedBalance.ProductSymbol}}</button>