Skip to content
Advertisement

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 original update

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.

How to bubble events on a component subcomponent chain with Vue js 2?

I have my vue application using: component-parent component that is made of component-child inside component-parent I have buttons, when someone click a button I want to emit an event in order to be handled by vue and passed to another component What I did so far: HTML: It reaches my console.log(pty); line but it seems that this.$emit(‘itemSelected’ wont get through:

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: method: It works fine. But when I try to get id inside a VideoEdit component using

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? EDIT: Here is my store: Answer Thanks to @wes

Initializing materialize elements in Vue.js

How can I initialize the Materializes’ select or modal elements in Vue.js? When I add the following code in my document ready the elements do not work. Answer You could try and call this code in one of Vue’s lifecycle hooks (see this diagram to find out where exactly they’re executed), you’ll probably want to use mounted. But keep in

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 question

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 my function:

Advertisement