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

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -