A
A
Artem00712017-02-01 10:46:36
Angular
Artem0071, 2017-02-01 10:46:36

How to pass an action from a service to a component?

Good afternoon!
Yesterday asked the question How to use a function inside a function inside a class?
And I ran into a new problem. How to tell the component that the song is over? Is it possible to somehow pass data from the service to the component?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lega, 2017-02-01
@lega

Yes, you can use pubsub to send events, or add a listener to the service and the component will already subscribe to it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question