'Angular same route navigation with params and query params

I have parameters in url and in my page there is listing with pagination. For pagination i want to use query parameters.

i am getting type by BehaviorSubject and getting query params by activatedRoute.queryParamMap. i have also used SameUrlNavigation: 'reload'.

Example : /type_1,/type_1?page=2,/type_1?page=3 /type_2,/type_2?page=2,/type_2?page=3

When i have selected type 1, then select pagination is works fine. **When i change param to type_2, then select pagination it is not working. It is not firing queryParam change event in ActivatedRoute. **

Can anyone help me to solve this ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source