Answer the question
In order to leave comments, you need to log in
Scope inside lambda functions (callbacks)?
I have Observable callback.
this.clientService.checkConnectionToONT(this.tan).subscribe(
response => {
this.etcdService.waitOntRegistrationEvents(response).subscribe(
registrationEvent => {
if (response.body === OntState.Online)
this.disableDuringCall = false;
});
...
Answer the question
In order to leave comments, you need to log in
Why not open the debugger yourself and take a look?
Answer: response will get into the closure of your inner function and will be visible.
And do not tear off the parameter like that. Write
this.clientService.checkConnectionToONT(this.tan)
.subscribe((response) => {
.....
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question