To simplify the markup of a Vue component, I’m trying to use an object for the props. When defining the template of the component as described in the code example on Components Basics — Vue.js all works fine. But trying to define the template as an x-template, I’m getting an error saying, that the property ‘title’ of undefined cannot be
Tag: vue.js
Vue change color of input field when clicked delete button
I am really new to vue js and I am trying to change the input field color when user click on the trash-fill button. Currently when I upload a character on input field it changes the color to green. Is there a way to change input field color from green to white when the user click on <b-icon icon=”trash-fill” font-scale=”1.5″
How to store strings for translation in Vue project
I want to use two Languages in my application – so i want a dictionary like string file (kinda like in android development) where i simply store my strings with id’s and can access the strings easily by id perhaps with a parameter for my language. What kind of file is easy to parse in my vue components and is
Pass params in google maps API url in vue.js
I have two params I get from a $router.push() : {{ this.$route.params.lat }} and{{ this.$route.params.lng }}. They are latitude and longitude coordinates. I have to pass the two of them in an URL to get a Google Maps: But doing so doesn’t work, I have a error message: Interpolation inside attributes has been removed. Use v-bind or the colon shorthand
How to update a value in multiples collections at once in firestore?
I’m building a forum appin Vue, basically a clone of this same site… The user can post questions, get answers to those questions and comments to those answers. I have a top level collection for questions, answers and comments respectively, and each document in those collections have a field called photoURL where I store the url of the profile image
How to comment out a HTML tag in .Vue ‘s template
Recently, I’m start learning Vue and using Vue-Cli. There’s a problem that I can not use hot-key(VSCode) to comment out a HTML tag in the . when I use “Ctrl+/” the line I want to comment out turns like this. not like this. Is there any possibility that I changed some setting in the VSCode to result this situation? Anyone
Error in v-on handler: “ReferenceError: number is not defined”
I started working on small project using Laravel and Vue.js. I tried to use v-model to set a value, but I get an error as seen below: Error message that I get: Answer v-model takes the name of a local data prop, so you should not use an expression there. However, v-model only makes sense for user input elements (e.g.,
Need help for a Vue – BMI Calculator
I am learning Webdev with Vue. And in my project, I built a component to calculate the BMI of a person. I have created a form with bootstrap-vue to get the values I need. And now I need help for the JavaScript part. I just don’t know how to correct it. Formula I have used: Answer A few issues: The
How to configure vee-validate globally in vue?
My question, is there a way we could create a one .js file and state all extend(s)? so we don’t need to extend each time we use the validator. I just ask because my codes becomes lengthy each time I need a validator. I need to extend it first to be usable. I’m currently using vue & vuetify with vee-validate.
Evaluate Value at Each Step of a Chained Promise and Break Out of Promise
I have the following chained promise. At each step, I need to evaluate if the returned value is not null. I can add an if else condition at each step, but I was wondering if there is a more concise way of doing this. Also, how can I break out of the chain if the value is null at any