Vue.js is a library for building interactive web interfaces. It creates data-driven user interfaces with a simple and flexible API.

learn more… | top users | synonyms

1
vote
0answers
4 views

Vue.js bind with es6 template string

Why can't I use es6 template-string with vue.js v-bind:style this works: <div :style="{transform:'translate('+x+'px,'+y+'px)'}"> but this silently fail: <div ...
0
votes
2answers
12 views

v-for show items that should be skipped in top level v-if

I have got next code: <div v-for="question in questions"> <h3 v-if="question.isEnabled">{{question.question}}</h3> <div v-for="answers in question.answers"> ...
0
votes
0answers
9 views

vue-router not work with express

I'm getting started with vue-router. Using express as server, but I found router don't work. The default page is , when I change the view, it just show the orginal view, like this . if I restart ...
0
votes
1answer
6 views

vue.js with Laravel pagination and filtering for list

I'm still debating the approach but this is what I have so far. The filters work great but the data list is over 2k items, so some sort of limit is going to need to be applied. The issue is that any ...
1
vote
1answer
18 views

VUEJS remove Element From Lists?

it is possible to remove specific element from lists. i tried this functions for remove element pop() = remove last element $remove(index) = not remove any element from lists remove( ...
2
votes
2answers
28 views

How do you pass parameters to an Express post HTTP method?

I'm building a simple REST API (with PouchDB and Vue.js). Right now, I can create projects with a few fields: server.js: var express = require('express') var PouchDB = require('pouchdb') var app = ...
0
votes
1answer
40 views

Vue.js Uncaught TypeError: this.list.$remove is not a function

I keep getting the same error that this.list.$remove is not a function. I believe it has something to do with the html markup but not sure. Can anyone point me in the right direction? I have been ...
0
votes
1answer
36 views

How to display data in template from Vue.extend?

Here is my code: var guestContent = Vue.extend({ template: ` <p>Guest content</p> `, data: function () { return { qs: ...
0
votes
0answers
40 views

Vue js v-model inside a bootstrap popover content

I'm stuck trying to get an input with a v-model to work inside a bootstrap popover. The current result is an unbound input. Note that mustaches are being correctly evaluated there. Here is a code ...
1
vote
1answer
19 views

How to use bootstrap select plugin with vuejs directive and browserify

I want to use bootstrap select plugin on a vuejs project and I am confused on how to incorporate it into my project as a directive. I came up with the following after looking at the select2 example in ...
1
vote
1answer
23 views

Importing vue compoents with webpack

I have a hello world vue app setup with webpack and have the initial App component working and mounted to body. Although within that App component I can't figure out how to use more components I make. ...
2
votes
0answers
24 views

Laravel 5.1 + Vue.js - vue-router beforeEach AuthService

Say I want to create an AuthService in vue-router to validate the current session before proceeding to the next route, like the example on: http://vuejs.github.io/vue-router/en/api/before-each.html ...
0
votes
1answer
28 views

Vuejs error when evaluating expression with v-if and v-for

Here is what I have: <div v-for="slot in card" class="panel panel-default"> <div class="panel-heading">{{ slot.name }}</div> <div class="panel-body"> <p v-for="wrestler ...
0
votes
1answer
33 views

Passing Huge data between Vue js routes

I have an application which searches for flights using Vue.js and Vue Router. I have two components, first one is search, which is on the base route '/'. When user clicks on search, it will send a ...
0
votes
1answer
24 views

Webpack vue error

I have webpack installed globally and have vue and loaders installed locally and have tried installing them globally. I keep getting this error when I run webpack Module parse failed: ...
0
votes
1answer
27 views

Get 'id' value from vue-router's link

How to get an object value from vue-router's link? For example 'id' in this link http://laravel.dev/#!/messages/1703 So with that id i can fetch specific data from database. My code var ...
0
votes
1answer
18 views

Returning undefined when fetching data from lumen api

I am using lumen as my api and access it through laravel using vue js. Please refer to the code below. When I console.log the books callback I am getting all the objects in the lumen api. However when ...
1
vote
1answer
31 views

Draggable with Vue.js, not being able to return to original position

I'm attempting to have an element's draggable functionality depend on a click event. I'm using jquery-ui's draggable method (within a vue.js instance). In my Vue instance I have these two data ...
0
votes
2answers
32 views

Changing an element's ID with Vue.js

I have a form where the user select a number between 1 and 4 with a select tag, with the property of v-model="screens". According to the number selected, with v-for="screen in screens" new select ...
0
votes
1answer
35 views

Vue.js Bindings in comments

One very useful feature of Knockout.js is the ability to put bindings in comments. For example, if I want a <ul> tag with some dynamically generated <li> tags plus the last one that is ...
2
votes
1answer
24 views

Is there a way to access a Vue Component's index — or some other unique identifier — from within its template?

If I'm creating, maybe dynamically, n number of components where each needs to refer to a unique index/id/reference from within its own template is there such a thing? I'm not using a for in loop to ...
0
votes
0answers
40 views

Adding data to array with JSON field

I'm having problem with my data property. data: function() { return { conversations: [ ] } } When I make a request to server i get response ...
1
vote
1answer
32 views

Vue.js Call method from another component

I have 2 components. How can I call fetchProjectList() method in createProject() method. First component: Vue.component('projects', { template: '#projects-template', data: function () { ...
3
votes
0answers
33 views

Two-way filter updating on the fly | Vue.js

How one can do custom two-way filter for model, updating on the fly in Vue.js. The following code example from docs works on input blur. But I need it work on keypress. Vue.filter('currencyDisplay', ...
0
votes
1answer
34 views

cant't query json data in laravel 5.2

I'm making a adressbook app via laravel 5.2 and vuejs, my app needs CRUD functionality, i stuck at Update part, i send the data via ajax to laravel and i get the data in laravel but i cant update ...
2
votes
1answer
27 views

VueJS - Fire a method in a v-for loop

Okay... In VueJS i'm running a v-for to list a couple of items. For example: v-for="item in cart" Bananas - 1 dollar - Yellow Apples - 2 dollar - Pink Grapes - 1.5 dollar - Green While listing ...
0
votes
1answer
27 views

How to enable syntax highlighting for embedded LESS styles in WebStorm?

I am using Vue.js for one of my frontend projects. As you know, Vue comes with special syntax for components - each component can be declared in a single .vue file. That means, that you can define ...
0
votes
1answer
25 views

Is it possible to have two vue.js instances in different windows use the same data?

I would like to be able to use two windows in my vue.js app, one for managing data, and one for presentation of the same data. (Imagine a live presentation where I can change things on the fly in one ...
1
vote
2answers
48 views

Vue.js + Webpack + vue-loader + bootstrap-sass + sass-loader

I'm just getting started with Vue.js + Webpack + vue-loader + bootstrap-sass + sass-loader and I'm a little lost. What I'd like to do is use the SASS version of bootstrap with my SPA Vue.js code. I ...
1
vote
1answer
30 views

Vue.js - can't load json data using vue-resource [duplicate]

I'm having trouble using vue-resource with some json data. I'm following the example here: https://github.com/vuejs/vue-resource/blob/master/docs/http.md My vue-resource call looks like this: ...
0
votes
0answers
30 views

vue.js - Uncaught TypeError: Cannot read property '$forContext' of null

I have encountered a very strange issue. everything seems to be working correctly, but on submission of inputs (I tried both the form submit event when i was using a <form/> element and the ...
1
vote
1answer
25 views

Vue.js permanently add filter to component

I'm wanted to force the running of a filter on a component everytime it's used. I know I can add a filter to a component in it's markup, but in this instance the filter is to be considered "required", ...
0
votes
0answers
26 views

Vue Nested router map url is not working when i copy paste in another browser

Nested routes are not working when i refresh the browser with the nested route url. Html file <div id="app"> <h1>Just demo for router</h1> <p> ...
0
votes
1answer
25 views

Running code in callback of Vue js $set method

I have a v-for that generates a list of flights. When user clicks on "flight details" button I send an AJAX request to server, and append the new info to the results array. In order to update the ...
1
vote
1answer
52 views

Testing Vue.js Component

I'd like to test a Vue.js component, and I'm failing at that. Simply put, I'm setting a component property, and I want to assert that it is set correctly. If that matters, the module is loaded with ...
2
votes
0answers
27 views

Vue + Turbolinks, how can I initialize components after page loads

I always set up one root (new Vue) and then add components to it. Then in my views I use the component that is needed at that time. For instance: // gulp.js: my build tooling var elixir = ...
-2
votes
2answers
37 views

Check the object already exists in array in Vue.js

I have a data: data: function() { return { conversations: [ ] } } I'm getting my data from response object: response.data.conversation Is ...
0
votes
0answers
49 views

Passing data from parent to child when rendering a list in vue.js

I am writing something in Vue.js and it requires iterating over a list of tags. When clicked, each of those tags should show the 5 most recent stories with said tag. I am using vue resources rather ...
0
votes
2answers
40 views

How to apply a filter within a Vuejs component?

If I have a simple filter, say: Vue.filter('foo', function (value) { return value.replace(/foo/g, 'bar'); }); And a simple component: Vue.component('example', { props: { msg: ...
-1
votes
0answers
30 views

Is it possible to connect to an external server.js with Node.js?

OK, so I started learning Node.js a couple of days ago, and of course, I want to host it online, more specifically; in my Laravel project so I can use the names and email addresses from the users ...
0
votes
2answers
32 views

Conditional style rendering with Vue.js

I have a component which render elements. The width of each element depends on minimized value (true or false). I need conditional style binding without class here. I tried: { ...
1
vote
1answer
41 views

Vue js reactivity issue when updating objects inside array used in v-for

I have an application using vue.js. I generate a list of results using v-for in an array of objects. when I update the object inside nth item in array, using underscore _.extend, the view of project ...
0
votes
1answer
42 views

How to add a Vuejs component to a Laravel Spark application?

I am working on a Laravel 5.2 project with Laravel Spark (which still in beta as at time of writing) and trying to add some Vuejs functionality using the default layouts and views. My first attempt ...
0
votes
1answer
40 views

Vue.js data-bind style backgroundImage not working

I'm trying to bind the src of a image in an element, but it doesn't seem to work. I'm getting a "Invalid expression. Generated function body: { backgroundImage:{ url(image) }". The documentation ...
0
votes
1answer
74 views

Vue.js Sortable list - updating model and saving position on change through AJAX

Fiddle: https://jsfiddle.net/fierflash/0h6uL4ek/2/ Objective: When a re-order takes place(through Sortable), send a AJAX Request to backend to save the new positions of the tasks Whats v-sortable? ...
0
votes
2answers
35 views

VueJS variable inside URL::action in Laravel

I am new to VueJS. I have a link using Laravel Helpers: <a href="{!! URL::action('TournamentController@edit', $tournament->id) !!}">{{ $tournament->id }}</a> As it will be ...
0
votes
1answer
52 views

Vue.js + jQuery UI draggable

To make components draggable I have written a new vue directive like this Vue.directive('drag', { bind: function () { $(this.el).draggable(); } }); and I make them draggable on bind. This ...
0
votes
2answers
43 views

Update array order in Vue.js after DOM change

I have a basic Vue.js object: var playlist = new Vue({ el : '#playlist', data : { entries : [ { title : 'Oh No' }, { title : 'Let it Out' }, { ...
0
votes
0answers
21 views

Vuejs Single File organization with Gulp

I've followed the laracast tutorial about Vue Workflow with Laravel. So I have a main.js: var Vue =require('vue'); import Tournament from '../components/Tournament.vue'; new Vue({ el: 'body', ...
1
vote
1answer
24 views

vue.js: uppercase tagname for filter not recognized

I am trying out vue.js to use form inputs to change a svg-element, for example the position and some filter-value of some rect. Below is part of an example, using two range inputs. See also ...