im new to angular ... i try to build new angular project with dynamic urls ..... mydomain name is xxx.yyy.com
after this url i give dynamic name like xxx.yyy.com/name1
, xxx.yyy.com/name2
,xxx.yyy.com/name3
etc.,
if i give this xxx.yyy.com/name1
url in browser means it gets all my data...i used homecomponent for this like..{ path: '', component: HomeComponent, children: [ { path: '**', component: HomeComponent} ]}
....if i want to search any product means this urls should come with xxx.yyy.com/name1/search/
i created seperate component for search like product-list component ... i try this path for routing
{ path:':string/search',component:ProductListComponent}
it not goes to productlist page ... it shows home page only
i tried this url navigation to go for serach page from home page
`this.router.navigate([name1+'/search'])`..
i get first segment for name1 and redirect to search using onclick method...how to go to productlist component page with dynamic url which i want.. thanks in advance...!