Skip to content
Advertisement

Tag: vue.js

Vue + Firebase: Functions useEmulator() ignored

I found this line of code in the Firebase docs firebase.functions().useEmulator(‘localhost’, 5001) that supposedly points your Vue app to the locally running emulator, but for some reason my project is ignoring said line of code and continues to call the remotely deployed function instead. Here’s what the relevant part of my @/plugins/firebase.js looks like: And then to call the botcheck

Wait for axios API call in vuex to finish before continuing vue-router guard

I have a django-rest-axios-vuejs application stack for which I’m trying to do something in the vue-router. In the vue-router beforeEach guard, I’m verifying permissions and it is done by checking something in an object called me in vuex store. Everything works well except when I refresh the page. Indeed refreshing the page also clears vuex store and my beforeEach tries

localstorage.getItem() not working in NUXT JS

I am trying to develop a shopping cart with nuxt js. I am successfully storing the cart data in local storage but I am unable to retrieve the data. N.B: i don’t wanna use vuex-persistedstate. Answer I see lots of small problems with this. First of all, it looks like you’ve put addToCart and saveInLocalStorage judging by the fact you

Iterarting over array of objects and get unique values of each object

I have this variable inside data(): What I want is to check if a value from this input field: is matching one of the keys of “jsonStatham” (uniqueOne/Two/Three) and then push the keys of the matching key into an array. so if the input === uniqueOne, so this array: Will look like this: inputFields[“field1″,”field2″,”field3″,”field4″,”field5”] That’s what I tried: What I

Creating an dropdown menu using a Vue instance

I switched from React to Vue and for me there are some incomprehensible nuances I want to create a drop-down menu, but I have some incomprehensible things related to this who is familiar with React knows that you can create a certain property with a boolean value inside a state or using hooks then when clicking on the buttons, use

Data rendered on the screen but has error on the console (Firebase with Vue): Uncaught (in promise) TypeError: Cannot read property ‘contents’ of null

I’m trying to get lesson.contents to render on the screen but I have some errors on the console. Here is the code (I’m using Firebase with Vue 3) Then I have this error: What I’m confused is that I’m still able to render lesson.contents on the screen: I’ve been trying a few hours trying to fix it but I could

Advertisement