N
N
nuclear_kote2020-03-17 01:40:38
Angular
nuclear_kote, 2020-03-17 01:40:38

How to properly pull the observer from another method?

Roughly speaking, there is a login method that sends a command to the websocket, after the response in onMessage, the Observable needs to work. i.e. subscribe worked or error.

I really don’t want to use EventEmitter, but as I understand it, it’s not entirely correct to take out observers

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Tsepkovsky, 2020-03-17
@Zippovich

You show the code, it is not entirely clear what you are going to pull and why.

P
Pavel Shvedov, 2020-03-17
@mmmaaak

You don’t need to pull the observer, you need to emit the value in the observable, and the observer must be subscribed to it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question