D
D
Denis2016-07-25 02:01:56
JavaScript
Denis, 2016-07-25 02:01:56

(Angular 2) What is the best way to pass a variable from a component to an adjacent component?

There is a certain tree of components, conditionally the main one and two children. It is necessary that when an event of one component (let's say a button click) changes the values ​​in another component. How can I do this without passing values ​​to the parent component?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rou1997, 2016-07-25
Vasylchenko @Duglas2_ua

Двусторонне привяжите оба View к одной Model.

D
DTX, 2016-07-25
@DirecTwiX

Сделать сервис.
https://angular.io/docs/ts/latest/tutorial/toh-pt4.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question