I got this on my main route module:
{
path: 'alpha/aaa',
loadChildren: 'app/connection/connection.module#ConnectionModule'
},
{
path: 'num/123',
loadChildren: 'app/connection/connection.module#ConnectionModule'
},
{
path: 'rand/a2b1',
loadChildren: 'app/connection/connection.module#ConnectionModule'
},
The routes are different but they are in one module because they have the same templates and functionalities.
My question is how would I map the defined paths above in the sub module's route if those are the exact path that I need? So I tried the following but didn't work:
const routes: Routes = [
{ path: 'alpha/aaa', pathMatch:'full', component: Component1 },
{ path: 'num/123', pathMatch:'full', component: Component2 },
{ path: 'rand/a2b1', pathMatch:'full', component: Component3 }
];