How to change port number in vue-cli project
How to change Port number in Vue-cli project so that it run’s on another port instead of 8080. 18 Answers 18
How to change Port number in Vue-cli project so that it run’s on another port instead of 8080. 18 Answers 18
In VueJS we can add or remove a DOM element using v-if: <button v-if=”isRequired”>Important Button</button> but is there a way to add / remove attributes of a dom element eg for the following conditionally set the required attribute: Username: <input type=”text” name=”username” required> by something similar to: Username: <input type=”text” name=”username” v-if=”name.required” required> Any ideas? … Read more
I just used the command line (CLI) to initialize a Vue.js project. The CLI created a src/components and src/views folder. It has been a few months since I have worked with a Vue project and the folder structure seems new to me. What is the difference between the views and components folders in a Vue … Read more
I am trying to authenticate a user using vuejs and laravel’s passport. I am not able to figure out how to send multiple parameters to the vuex mutation via an action. – store – export default new Vuex.Store({ state: { isAuth: !!localStorage.getItem(‘token’) }, getters: { isLoggedIn(state) { return state.isAuth } }, mutations: { authenticate(token, expiration) … Read more
In my main page I have dropdowns that show v-show=show by clicking on link @click = “show=!show” and I want to set show=false when I change route. Advise me please how to realize this thing. 8 Answers 8
I’d like to make a redirection in Vue.js similar to the vanilla javascript window.location.href=”https://stackoverflow.com/questions/35664550/some_url” How could I achieve this in Vue.js? 18 Answers 18
How can I repeat a loop via v-for X (e.g. 10) times? // want to repeat this (e.g.) 10 times <ul> <li v-for=”item in shoppingItems”> {{ item.name }} – {{ item.price }} </li> </ul> The documentation shows: <ul> <li v-for=”item in 10″>{{ item }}</li> </ul> // or <li v-for=”n in 10″>{{ n }} </li> // … Read more
I have a simple input box in a Vue template and I would like to use debounce more or less like this: <input type=”text” v-model=”filterKey” debounce=”500″> However the debounce property has been deprecated in Vue 2. The recommendation only says: “use v-on:input + 3rd party debounce function”. How do you correctly implement it? I’ve tried … Read more
Is it possible to dispatch an action between namespaced modules? E.g. I have Vuex modules “gameboard” and “notification”. Each are namespaced. I would like to dispatch an action from the gameboard module in the notification module. I thought I could use the module name in the dispatch action name like this: // store/modules/gameboard.js const actions … Read more
I’ve to use two external scripts for the payment gateways. Right now both are put in the index.html file. However, I don’t want to load these files at the beginning itself. The payment gateway is needed only in when user open a specific component (using router-view). Is there anyway to achieve this? Thanks. 17 Answers … Read more