我要打开的地址是: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
提交
取消