Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue] firebase object #63

Closed
amranidev opened this issue Jan 26, 2017 · 4 comments
Closed

[Issue] firebase object #63

amranidev opened this issue Jan 26, 2017 · 4 comments
Labels

Comments

@amranidev
Copy link

Hi I really like this package and I'm looking forward to use it in the my future projects .

When I try to get user messages, the firebase object does not recognize userID data and refer it to undefined.

created(){
    this.auth.state({
        forward: '/app',
        redirect: '/login'
     }, (user) => {
         this.userID = user.uid // return firebase user id
         console.log(this.userID)
     });	
},
firebase:{
    messages: store.state.messages('messages/' + this.userID // undefined)
} ,
data()
{
    return {
        userID: '',
        auth: new Auth()
   }
}
@posva
Copy link
Member

posva commented Jan 26, 2017

use the function syntax for firebase: firebase () { return { ... }

@posva posva closed this as completed Jan 26, 2017
@posva posva added the question label Jan 26, 2017
@amranidev
Copy link
Author

@posva
Sorry
I still got the exact same thing userID = undefined

@posva
Copy link
Member

posva commented Jan 26, 2017 via email

@posva
Copy link
Member

posva commented Jan 29, 2017

There was indeed an issue the data not being initialised in the firebase hook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants