url - How can I deal with child route with params in angular 2? -
when i'm in videocomponent url looks : app/video/9
here problem, want reach editcomponent when click tag (with routerlink) , rewrite url : app/video/9/users/3
this route config :
@routeconfig([ { path: '/video/:video_id/users/:user_id', component: edit, name: 'edit'}, { path: '/video/:video_id/', component: video, name: 'video'} )]
and routerlink :
[routerlink]=" ['edit',{user_id:1}]"
what missing ?
ok, forgot directives in child editcomponent :
directives: [routeroutlet, routerlink]
Comments
Post a Comment