How to subscribe params and queryParams both same time Angular 9+

 In this tutorial, you’ll learn how to subscribe params and queryParams both same time Angular 9+.

Step-1 : 

import { combineLatest } from "rxjs/internal/observable/combineLatest";

Step-2 :

combineLatest([this.route.paramMap, this.route.queryParamMap]).subscribe(
      ([pathParams, queryParams]) => {
        console.log(pathParams.get("slug");
        console.log(queryParams.get("page"));
})