I have a page called
http://example.com/consultation which represents the landing page (first page) of angular in my site, and the routes are as shown below.
The Question is: when the link is http://example.com/consultation (without anything after consultation i need to distribute routing randomly to ask-question and service-page. Any idea how to achieve this?
export const routes: Routes = [
{
path: 'consultation',
component: OnlineConsulationComponent,
children: [
{ path: '', redirectTo: 'ask-question', pathMatch: 'full' },
{ path: 'ask-question', component: AskQuestion },
{ path: 'service-page', component: ServicePage },
{ path: '**', redirectTo: 'ask-question' }
]
}
];