Skip to content

Tag: vuejs2

Vue.js – components data do not update

I have a Vue list that is based of an array and each array item renders a component where I bind the array item properties. This component has a mixed data, based on the binded properties The problem is that when I change the initial list array in any way, the mixed prop of the component maintains it’s …

VueJS – Transition not working

I’m trying to apply a transition whether a component has to be shown or not. I’m wondering why this simple example is not working: http://jsfiddle.net/bf830qoq/ Javascript HTML CSS Answer Your syntax is wrong, you have to use name attribute for transition, like following: See working fiddle.

Vue $route is not defined

I’m learning Vue router. And I want to made programmatic navigation without using <router-link> in templates file. My router and view: So by default I push to ‘allVideos’ route and inside that component I have a button and method for redirecting to ”editVideo’ button: metho…

Accessing Vuex in v-bind

I would like to access a value from a Vuex store module within v-bind. This throws the following error: TypeError: Cannot read property ‘signupForm’ of undefined I have tried adding the following: And replacing the failing line with: as well as a panoply of other things, to no avail. Any ideas? ED…

Show updated value on click

I have a function that adds items to a cart, when an item is already in the cart, I expect it to only add 1 to quantity of that item(which it does). The problem is I can’t view the updated quantity until there is another action such as adding another item to the cart. I followed solutions from similar q…

How to call a vue.js function on page load

I have a function that helps filter data. I am using v-on:change when a user changes the selection but I also need the function to be called even before the user selects the data. I have done the same with AngularJS previously using ng-init but I understand that there is no such a directive in vue.js This is …