title: can not pass queryParams to server
body: <p>i am trying to pass the products queryParams for my product-list page.</p>
  <p>my html code (just one option for the example) -</p>
  <pre><code>&lt;a 
  class=&quot;linkCategoriesInner__link&quot;
  [routerLink]=&quot;['/product-list']&quot;
  [queryParams]=&quot;{ gender: 2, category: 2 }&quot;
  &gt;Jackets&lt;/a&gt;
  </code></pre>
  <p>when i click im directed to <code>localhost:4200/product-list?gender=2&amp;category=2</code></p>
  <p>then im getting the queryParams on my product-list component -</p>
  <pre><code>ngOnInit() {
      this.route.queryParams.subscribe(
        (params) =&gt; {
          console.log(params);  
        }
      )
  </code></pre>
  <p>here i get my queryParams</p>
  <p>then im trying to pass it to the server by the following files -</p>
  <p>products resolver -</p>
  <pre><code>class ProductsResolver
    implements
      Resolve&lt;
        Pick&lt;IProductInterface, 'image' | 'title' | 'price' | 'description'&gt;[]
      &gt;
  {
    constructor(private productService: ProductService) {}
  
    resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable&lt;Pick&lt;
    IProductInterface, 'image' | 'title' | 'price' | 'description'&gt;[]
    &gt; {
      console.log(+route.paramMap.get('gender')!)
      return this.productService.getProducts(
        +route.paramMap.get('gender')!,
        +route.paramMap.get('category')!,
        );
    }
  }
  </code></pre>
  <p>products.service.ts -</p>
  <pre><code> public getProducts(
      gender: ProductGender,
      category: ProductCategory
    ): Observable&lt;IProductInterface[]&gt; {
      return this.httpProductService.getProducts(gender, category).pipe(
        catchError((errorResponse: HttpErrorResponse) =&gt; {
          let errorMessage: string;
  
          switch (errorResponse.status) {
            case 400:
              errorMessage = 'Getting products failed';
              break;
            default:
              errorMessage = 'An error occurred';
          }
  
          return throwError(errorMessage);
        }),
        map((response: IGetProductsResponse) =&gt; response.data!)
      );
    }
  </code></pre>
  <p>http-products.service.ts -</p>
  <pre><code> public getProducts(
      gender: ProductGender,
      category: ProductCategory
    ): Observable&lt;IGetProductsResponse&gt; {
      const baseUrl = ENDPOINT;
  
      return this.http.get&lt;IGetProductsResponse&gt;(
        `${baseUrl + gender}/${category}`
      );
    }
  </code></pre>
  <p>and i get 0 in the queryParams in the backend controller.
  does anyone know why? thanks.</p>