参数化默认路径(以角度为单位)>

问题描述 投票:0回答:2

如何设置带有参数的默认路由(例如: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'},...

html angular typescript angular-material angular-router
2个回答
0
投票

您只需添加:以及路径中的参数:


0
投票

是,有可能只需更改路线

© www.soinside.com 2019 - 2024. All rights reserved.