I'm trying to use Angular 2 rc-4 with new Router.
export const appRoutes:
RouterConfig =[
{
path: "",
component: HomeComponent,
terminal: true,
data: {
title: "Home"
}
},
{
path: "Users",
component: UserListComponent,
data: {
title: "Users"
}
},
{
path: "Users/:id",
component: UserEditComponent,
data: {
title: "Edit User"
}
}
];
Then I subscribe to change route event. When event fires I want to find item from
appRoutes
The problem is with url with params:
Users/:id
I don't know how to compare it with current page url or how to ask RouterConfig.
Can you please help me?