A
A
Alexander2017-02-10 12:55:52
Angular
Alexander, 2017-02-10 12:55:52

How to pass an event to another unrelated component (Angular 2)?

On all pages of the site there will be left navigation , like a toaster:
464515a8b984438489ac2a2c7ffefaf2.pngAnd also on all pages there will be a button on the right , which should toggle left navigation
I made a left navigation component, this is how I connect it to all pages in the root html:

<left-aside></left-aside>
<router-outlet></router-outlet>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Belov, 2017-02-10
@AlexanderBelov

RxJS

E
emp1re, 2017-02-10
@emp1re

According to the description of the task, I do not see why this should be done in each component. Enough only in left-aside.
In general, through any service, you can do this in the usual way. And here rxjs is not clear.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question