Ron McLeod wrote:This is what your code looks like with proper formatting:
The handler code will not be executed until the Observable publishes by calling your next callback function. It is very likely that before the handleLogin will be executed before that happens.
Did you mean to put the call to handleLogin inside the callback function?
Can you tell me what you mean by callback function? I was able to solve it with the setTimeout function at 1000 ms. For some reason, the code was being executed before everything inside the subscribe was finished until I added the timeout.