0
我有以下网址:localhost.com:1234/?param1=abc¶m2=def
从替换原来的URL防止Angular2路由器
Route.config = [
{ path: 'first', component: 'firstComponent' },
{ path: 'second', component: 'secondComponent' }
]
虽然应用程序初始化URL被替换到localhost.com:1234/#/first
。
我如何防止这种情况,以便我的重定向url将是localhost.com:1234/?param1=abc¶m2=def#/first
?
类似SO - https://stackoverflow.com/questions/39898656/angular2-router-keep-query-string – Asit
问题在我的index.html页面添加window.history.pushState = NULL得到修复 – Asit