in my route config I have a route with children set, something like this:
{
path: 'users',
children: [
{ path: ':id', component: UserDetailsComponent },
{ path: '', component: UserListComponent }
]
}
now, in my UserListComponent I need to build a link to user profile on the fly, having the path and the id value.... so how would I do that, providing that I have injected successfully the router (private router: Router)
so I would like to do is
const link = this.router.createUrl('/users', {id:item.id});
and I would get something like this
/users/xyse1334