In an Angular (v7) application, I have routing setup like this:
export const routes: Routes = [
{
path: '',
component: HomeComponent,
children: [{
path: '',
component: Main
},
{
path: 'main',
component: Main
},
{
path: 'search/:imageid',
component: Image
},
{
path: 'search',
component: Search
}]
}]
What I'm expecting to happen, is for a URL like this:
domain.com/#/search;imageid=512
The router will redirect to the Image component, and for a URL like this:
domain.com/#/search
The router will redirect to the Search component, but Search is getting both, and the route to Image is being bypassed.
I'm not sure what I'm missing here.