In angular 2 how to preserve query params and add additional query params to route

后端 未结 4 852
一生所求
一生所求 2020-12-29 22:00

For example I am on route /cars?type=coupe and I want to navigate to the same endpoint with additional query params (but keeping existing one). I am trying some

4条回答
  •  离开以前
    2020-12-29 22:48

    There is an open issue and also already a pull request to make preserveQueryParams a router setting instead of a per navigation setting

    • https://github.com/angular/angular/issues/12664
    • https://github.com/angular/angular/pull/12979
    • https://github.com/angular/angular/issues/13806

提交回复
热议问题