0

i am building a chat website , i have a component called "chat Box" , i need data of both the users to be fetched from firebase , i have stored the key of other user in the service, (can confirm as i can see the details in console),i am unable to get the key of the other users stored in service

i tried console.log(this.details.user.OtherUser); but it gives undefined

but from the console.log(this.details.user); i am getting the following correct object .

in short ,the following code

    console.log(`/${this.details.user.OtherUser}`)
console.log(this.details.user);
console.log(this.details.user.OtherUser);
console.log("above from constructor")

console.log statements

gives me output

what i am doing wrong?

0 Answers0