How can I set my title in the URL or routing module using Angular 2+? -
i need this
home.routing.module.ts
@ngmodule({ imports: [ routermodule.forchild([ { path: 'car/<any content>/:id', component: cardetailcomponent } ]) )
i did quick check couldn't find examle this
it placeholder /:title
, same of did id
routermodule.forchild([ { path: 'car/:title/:id', component: cardetailcomponent } ])
for redirecting on above url use routerlink
directive appropriate parameter.
[routerlink]="['car', title, id]"
Comments
Post a Comment