S
S
Selsh2017-04-05 17:14:09
Angular
Selsh, 2017-04-05 17:14:09

How to track parent events in child component?

There is a button in the parent component, how to track its clicks in the child?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nicholas, 2017-04-05
@Selsh

So as not to shoot yourself in the foot - no way.
Ideally, a parent should give data to their children. And instead of telling the children to click, just modify the data that is used to display the children.
If this does not work out, the general data should be transferred to the service with some kind of pub/sub or observable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question