我想通过链接 http//:localhost:4200/hello?abc=123 访问具有如下路由的angular应用,这个路径肯定是重定向到auth/server/login的,我想在路由守卫里获取一开始访问的这个链接http//:localhost:4200/hello?abc=123及其查询参数该怎么做
const routes: Routes = [
{
path: '',
component: AppComponent,
canActivate: [appGuard],
children: [
{
path: 'pages',
loadChildren: () => import('./pages/pages.module').then(m => m.PagesModule)
},
{
path: 'auth/server',
loadChildren: () => import('./auth/auth.module').then(m => m.AuthModule)
},
{
path: '',
redirectTo: 'auth/server/login',
pathMatch: "full"
}
]
},
{
path: '**',
pathMatch: "full",
redirectTo: 'pages/not-found'
}
];
@NgModule({
imports: [RouterModule.forRoot(routes, {useHash: true})],
exports: [RouterModule]
})
export class AppRoutingModule { }