How to send data between tow components in Angular 2 application considering: - two components in two different routes ( thus, the only shared component is the root one)
I have managed to: - Use Shared services or Singleton however, how can I trigger the event from the first component to another ( that lies in the another routes )
I have managed to trigger the event using output to the last component before the root ( but not accross the root-app component)
Any help, links, clues appreciated!
<div class="wrapper">
<div class="tasks-list">
<router-outlet></router-outlet>
</div>
<div class="details">
<task-details></task-details>
</div>
</div>
this is app.component.html
I have a list of 'task.component' when clicking on of the itmes it should open in the 'task.details.component'. I hop I illustrated the idea in a good way.