My router file checking what role is logged in: and my admin router is: I have already add requiresAdmin: true, requiresStaff: true, in meta field. But when i login with admin, its work. But when i login with staff account, i cant reach dashboard page. Answer The problem is that when you are logged in as staf…
Tag: vue.js
Nuxt app failed heroku deployement code=H10 error
I’m trying to deploy my ecommerce nuxt app to heroku. Here’s exactly what I did then I followed exactly what the heroku website did list. Everything works Once I visit the link, however, I get an error: After following the heroku tail command, the app keeps crashing with the following error Now i …
Passing vuejs input value to multiple data
I want to send an input value to more than one data. I searched but couldn’t find it, how can I do it? How can I do without method? Answer You can use this syntax to pass input value to multiple variables:
Vue div display grid remove extra space between rows
I am new to Vue and for this project, I was trying to display 2 players in each row for a div. I solved that using display: grid; CSS as on playerDiv id. The issue is I am having right now is it creates a huge gap in between the first, second, and third rows. Is there a way to
Weather app with Vue js and Open Weather Map API and 7 day weather forecast
Hi guys I’m trying to build a weather app with a 7 day forecast of a city to be informed by the user. It has to be in Vue js and use the Open Weather Map API. I managed to make the app and connect it to the Open Weather Map API displaying the weather. But I couldn’t display the
Hiding div/popup on page load until button click
I have a working modal in Vue, however, the modal loads empty for a split second on page load and I want it to remain completely hidden (even on page load) until the button is clicked. I tested with display:none in the CSS which works to hide it on page load, but it remains completely hidden when pushing the …
Firebase – Vue database integration not working
I am trying integrating Firebase with Vue 4 application is currently getting the following error. Uncaught TypeError: db__WEBPACK_IMPORTED_MODULE_1_.default.database is not a function I am using “firebase”: “^9.0.0” “vue”: “^3.0.0” My function call is as below I…
Cannot set property ‘srcObject’ of null in Vue.Js
I am using vue.js with element-ui library and I have this problem where I need to show this dialog component to be able to show the camera and the user’s audio but I have the following error in console TypeError: Cannot set property ‘srcObject’ of undefined” As you can see, first I am …
What is the best way to use $state in Vue.js?
I used to do AngularJS and now I wanna try to work with Vue.js. But I have a simple question: what is the best way to use and access states? I saw so many solutions on Google but I can’t find which one is the best for a beginner. I used to use states like this : Can you give
NuxtJS how to reload asyncData with emit
I would like to know if it is possible to reload asyncData in an emit in a function like this Page component-child Is it possible? Otherwise how to do it? Answer You can try this.$nuxt.refresh() to refresh fetch() or asyncData() hooks. As explained in the documentation: https://nuxtjs.org/docs/2.x/concepts/co…