I am facing an issue where I cannot access the value of var Login inside submit() function. This could possibly be due to a race condition. What could be causing this blockage in accessing the value of var Login? Here is the code snippet:
class ABC {
Login : any;
send(){
this.preview.send().subscribe(
(data =>{
this.Login = data;
console.log("This is the new list in send function",this.Login); //Printing value of this.Login
})
);
submit(value) {
// let Log : any = this.Login_Object['login'];
console.log('Inside submit function', this.Login);// Not printing value of this.Login
}
}