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

Popular posts from this blog

html - How to custom Bootstrap grid height? -

javascript - pass values from mssql to views in node -

image - python get coordinates (pixels) of corresponding points from clicks -