vuejs vuex firebase

0

I have a problem with mounting my next firebase reference

export default {
        firebase () {
            return {
                gastos: db.ref('user/${this.uid}/shop/'), 
            }
        },
        computed: {
            uid () {
                return this.$store.getters.getUser.uid
            },
        }
    }

What happens is that here gastos: db.ref(1user/${this.uid}/shop/') my this.uid has not yet been defined in my store and does not mount my firebase reference

But if I use {{uid}} in the template is ok, what am I doing wrong?

    
asked by anonymous 05.08.2017 / 03:44

0 answers