Reputation: 9247
When i console.log(this.user)
i get this:
Object
isLoggedIn
:
true
user
:
Object
created_at
:
"2017-03-14 09:04:42"
email
:
"[email protected]"
id
:
4
name
:
"user"
updated_at
:
"2017-03-14 09:04:42"
But when i now to try to access this.data.email i get undefined. Any suggestion how can i get email from this object?
Because in my template i want do something like this:
<div class="panel-body">
You are logged in! <span>{{ user.email }} </span>
</div>
Upvotes: 0
Views: 44
Reputation: 417
I'm not sure if it's gonna work for you, but try this in your html:
<div class="panel-body">
You are logged in! <span>{{ user.user.email }} </span>
</div>
Upvotes: 1