如何设置带有参数的默认路由(例如:www.test.com/landing-page?uid = 123&mode = front&sid = de8d4)
const routes: Routes = [ { path: '', redirectTo: 'landing-page', pathMatch: 'full' }, { path: "landing-page", component: LandingPageComponent }, { path: '**', redirectTo: '' }, ];
我的项目有一个工作流程,用户可以通过其他网站或带有查询字符串中的数据的应用程序将用户重定向到我的角度应用程序。是否可以使用带有参数的默认路由。
我如何使用参数设置默认路由(例如:www.test.com/landing-page?uid=123&mode=front&sid=de8d4)const路由:路由= [{路径:”,redirectTo:'登陆页面' ,pathMatch:'full'},...
您只需添加:以及路径中的参数:
是,有可能只需更改路线