I have a ListComponent. When an item is clicked in ListComponent, the details of that item should be shown in DetailComponent. Both are on the screen at the same time, so
This is not what you exactly want but for sure will help you out
I'm surprised there's not more information out there about component communication <=> consider this tutorial by angualr2
For sibling components communication, I'd suggest to go with sharedService. There are also other options available though.
import {Component,bind} from 'angular2/core';
import {bootstrap} from 'angular2/platform/browser';
import {HTTP_PROVIDERS} from 'angular2/http';
import {NameService} from 'src/nameService';
import {TheContent} from 'src/content';
import {Navbar} from 'src/nav';
@Component({
selector: 'app',
directives: [TheContent,Navbar],
providers: [NameService],
template: ' '
})
export class App {
constructor() {
console.log('App started');
}
}
bootstrap(App,[]);
Please refer to link at top for more code.
Edit: This is a very small demo. You have already mention that you have already tried with sharedService. So please consider this tutorial by angualr2 for more information.