Angular2 router keep query string

前端 未结 9 1737
栀梦
栀梦 2020-11-29 01:52

I wrote an Angular2 (v2.0.1) application that makes use of the router. The website is loaded with several query string parameters, so the full URL initially looks like this:

9条回答
  •  时光取名叫无心
    2020-11-29 02:20

    You may want to search https://github.com/angular/angular/issues for a feature request similar to this. If none exists, submit a feature request.

    In the mean time: I believe you will need to create a component, on the path: '', with the sole purpose of then redirecting to '/comp1' while preserving the QueryString params.

提交回复
热议问题