我要打開的地址是:localhost:8080/index.html?token=123#/home回車確定后為什么就變成:localhost:8080/#/home我的文件名和query值都沒了難道我的寫的路由有問題嗎?項目是新建的,只創建了HOME組件和添加路由const RouteConfig:Routes = [ ?{path: "home", component: HomeComponent}, ?{path: '**', redirectTo: '/home', pathMatch: 'full'}];imports: [ ?BrowserModule, ?RouterModule.forRoot(RouteConfig, {useHash: true})]
添加回答
舉報
0/150
提交
取消
