I have to say I just started to look into Angular2 and it seems really interesting.
I stumbled on this problem today where I configured routes like this:
{
path: 'artists',
component: ArtistComponent,
children: [
{ path: ':id', component: ArtistsDetailComponent },
{ path: '', component: ArtistsHomeComponent },
]
},
Idea is to show artists list (ArtistComponent) on the left and when clicked, there will be this detailed view (ArtistsDetailComponent) opened on the right side.
ArtistsComponent template has in it so when navigating to /artists/:id I really do see list of articles on the left and detailed view on the right (in this router-outlet).
All good except I need to have these two components communicating with each other, so when I make a change in detail view, it should be changed in the list.
When googling, I see that I should use component selector together with variable mapping info:
<artist-detail [artist]="selectedArtist"></artist-detail>
but then I get an error saying that I don't have router-outlet and Angular don't know where to put ArtistsDetailComponent view...
So specialists, please help...! :)