I need to add some kind of global routing parameter in my Angular application.
I need different clients to use one site depending on the link they entered from.
For example: https://myrandomsite/client1/sessions/login https://myrandomsite/client2/sessions/login https://myrandomsite/client3/sessions/login
I have this in app.routing
{
path: '',
component: AuthLayoutComponent,
children: [
{
path: 'sessions',
loadChildren: () => import('./views/sessions/sessions.module').then(m => m.SessionsModule),
data: { title: 'Session'}
}
]
}
And in my session.routing
export const SessionsRoutes: Routes = [
{
path: "",
children: [
{
path: "signup",
component: SignupComponent,
data: { title: "Signup" }
},
I can add an :id before every child module like path: "client-name:/signup", but want it at the start of the route throughout the application.
Or any other suggestions on how I can accomplish this will be appreciated.