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

3
votes
1answer
19 views

Vue js - Update index value doesn't update the second component's view

I have this pretty simple Vue js page as below: <html> <head> <script src="https://unpkg.com/vue/dist/vue.js"></script> </head> <body> ...
5
votes
3answers
34 views

In Vue.js, is there an way to keep component templates out of JavaScript strings?

I just worked through the Guide on Vue.js's website, and I have a bad feeling about templates for components. It seems strange to me that they are specified in strings; sure, maybe this works for ...
3
votes
1answer
16 views

Conflicting components in scope

I am trying to abstract a Google Places Autocomplete input component in order to use it multiple times. However, data and methods overlap when I instantiate more than 1 of the following component. (...
0
votes
1answer
9 views

Vue2 Laravel5.3 How to send data from child to parent on event

What I am trying to achieve here is that when I click on the item in Item-card-product-choices.vue it will trigger selectPC with argument productChoice.id and this will also trigger parent to listen ...
1
vote
1answer
18 views

Losing 'this' scope in a Vue + Vuex + Phaser reactive call [duplicate]

I was trying to make a game using Vue + Vuex, but in the middle of the project I realised that the most interactive part of the game had to be made with Phaser, then I decided to use Phaser for that ...
1
vote
1answer
17 views

Accessing Vuex in v-bind

I would like to access a value from a Vuex store module within v-bind. <input @blur="validate_field" name="firstName" placeholder="First Name" :class="{fail: this.$store....
0
votes
0answers
18 views

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. <script> $(document).ready(...
0
votes
3answers
38 views

Filter list with Vue.js

I just go started with Vue.js and here is what I'm doing: I am rendering a list of products, and each product has a name, a gender and a size. I'd like users to be able to filter products by gender, ...
2
votes
1answer
22 views

VueJS Reactive Binding for a Plugin - How To?

I am working on a Vue plugin for Pouch/CouchDB which will be open sourced, but as long as i can figure out an issue i am having: Currently i am trying to make the plugin closely to resemble Vuex, ...
0
votes
1answer
16 views

Vuejs custom properties on root element

While developing my app I have had a wrapper (simplified for this example) which is the root of all my elements in the site. However I needed to include a component with custom properties alongside ...
3
votes
1answer
24 views

Performing multiple requests Axios (Vue.js)

I am trying to perform two, non-concurrent request, but would like to use data from my first request before performing a second request. How can I achieve getting the data from the first request then ...
0
votes
0answers
23 views

Unable to view vue component on logged in profile

I have a vue component which can be seen on other users's profile but not on logged in user. when I visit other user's id i can see that component but when I come back to my id it disappears profile ...
-2
votes
0answers
29 views

Is there some vue-like solution for pure project

With .vue we can put style, script, template to one file. It's good for component management. But some times need a tiny(size is important) like embedded SPA. Frameworks should be banned and focus ...
0
votes
2answers
30 views

Manipulating the data value in Vue.js

How can I set the value of name to the property personOne in object? So that name will have the value of Alex. var app = new Vue({ el: '#app', data: { name: '', object: { "...
2
votes
1answer
24 views

error in unit test vue.js karma : undefined is not a constructor ()

This is my first unit test and I'm getting an error message that couldn't find why I get it in the forums so far. This is my unit test: import LoginPage from 'src/pages/Login' describe('Login.vue', ...
0
votes
0answers
19 views

Don't “require” an already imported library using Laravel's Elixir and Webpack

This question is more webpack related, but since I'm using laravel's elixir tool I need some help to accomplish what I want. In my project, I have 2 files, a vendor.js with vue + jQuery and another ...
0
votes
1answer
22 views

Laravel 5.3 & vuejs fragment instance issue

I'm running a Laravel 5.3 application which supports VueJS out of the box with webpack. I'm having an issue making using vue-multiselect, which displays: [Vue warn]: Attribute "v-model" is ignored ...
0
votes
2answers
27 views

VueJS api call leaving data undefined

I am learning VueJS 2.0 and I am connecting to an API where I want the value of some data to change on input change. Here is what the output says using the dev tools: canadianDollar:undefined ...
0
votes
1answer
11 views

Check permissions before vue.js route loads

does anyone know how to check a user's permissions before a vue.js route is rendered? I came up with a partial solution by checking permissions in the created stage of a component: created: function (...
0
votes
0answers
22 views

unable to see vue component on logged in profile

I have a vue component which can be seen on other users's profile but not on logged in user. when I visit other user's id i can see that component but when I come back to my id it disappears ...
0
votes
1answer
54 views

Vue router - API Data not fetching on redirect

I'm building an application with JWT Login and i check if the user is logged in (when visit /) and then i redirect to Dashboard: let routes = [ { path: '', component: Login, beforeEnter(...
0
votes
1answer
17 views

How to get a specific value from vue.js asp.net-core-mvc result set

I've made an implementation of vue.js in an .net-core mvc project which will return data from a controller. So let's say that the result is: [{"id":1,"uniqueStr":"string1","ttlValue":"something","...
0
votes
0answers
37 views

Vue.js component updates inconsistently

I'm just experimenting with Vue.js and have encountered what seems to be inconsistent behavior by Vue.js updating a component. (The commented out <span> triggers the behavior I expect.) The ...
0
votes
0answers
30 views

How to create a component which add nothing the html

How to create a component in Vue which just adds, say, onmousedown listener to its child? Having that: <div id="app" class="container"> <foo> <p>hello</p> <...
-1
votes
1answer
36 views

Count number of items with active state

I have a function to toggle an active state on clicked list items: Vue toggleActive: function(s){ s.active = !s.active; }, Pug li(v-for='property in properties', v-on:click='toggleActive(...
0
votes
1answer
23 views

Vue Tables 2 - Custom filters

I'm trying to use this https://github.com/matfish2/vue-tables-2 with Vue 2.1.8. And it's working perfectly BUT I need to use custom filters to format some fields based on their value etc. In options ...
0
votes
0answers
16 views

Vue and Axios CORS error No 'Access-Control-Allow-Origin' header is present on the requested resource

I am currently getting the above error, I am using Axios to make the GET request to an external API. After reading the Mozilla docs, doing a lot of research and trying different options I am still not ...
0
votes
0answers
43 views

How to solve 500 (internal server error) on delete modal vue.js?

My view is like this : @foreach($account_list as $account) <table class="table table-bordered"> ... <li> <a href="javascript:;" @click="modalShow('modal-delete-...
0
votes
2answers
22 views

Unit testing HTTP request with Vue, Axios, and Mocha

I'm really struggling trying to test a request in VueJS using Mocha/Chai-Sinon, with Axios as the request library and having tried a mixture of Moxios and axios-mock-adaptor. The below examples are ...
1
vote
1answer
33 views

How to assign json value to variable in Vue.js?

I use Firebase to store the database, and have a object currentWeek with a value off the current week. I want to store the value of this object in a variable to call it. Currently I'm using this to ...
1
vote
4answers
52 views

How to sort li's in reverse

I'm trying to sort an unordered list in reverse (vueJS 2.x), but I can't seem to find any documentation on filters like there used to be in vue 1.x (similar to the way Angular 1 did it) e.g: <li ...
0
votes
0answers
14 views

Accessing an external php file in vue.js with axios

I am using axios inside a vue component and trying to call an "external" php file. I have my src folder. Inside that are my components. My root is court. I have a folder named ajax where all of my php ...
0
votes
1answer
24 views

Faltering first steps with vue-router

I'm trying to use vue-router and I've fallen at the first hurdle. I have the following routes set up: const router = new VueRouter({ mode: 'history', routes: [ {path: '/', ...
2
votes
2answers
37 views

What is the proper way to use multiple heavy same VueJS components on a page?

I am trying to create custom input as VueJS component. It will have <input type="text"> field and button. This component must implement such behavior: you can type text with autocomplete or ...
0
votes
0answers
26 views

vue-resource http request gives:' _.isArray is not a function

I'm trying to get an object from a server at localhost:3000. I can see the object when I go to the address in my browser. My front end runs this function defined in my Vue instance's methods ...
1
vote
1answer
26 views

What are the pros/cons of importing components in main.js (for VueJS)?

I'm using vue-cli + webpack as my dev environment and I have most components included/declared in main.js as Vue.component('<name>',require('./components/<name>.vue')); Is there an ...
1
vote
1answer
22 views

Why do I see this error in android web-view in vue.js

I am using vue.js in my web app and everything works fine in desktop browsers but not in mobile, so I installed android emulator to see what's the problem and I was surprised to see this (I used ...
1
vote
1answer
23 views

Preserve component state with vue-router?

I have a listing/detail use case, where the user can double-click an item in a product list, go to the detail screen to edit and then go back to the listing screen when they're done. I've already done ...
2
votes
1answer
33 views

Vue.js 2.0 this.$compile

How do can you compile a HTML string to template within a component method? This was possible in Vue 1 like in this jsfiddle new Vue({ el: '#app', data: { sampleElement: '<button v-...
0
votes
1answer
31 views

How can I run functions within a Vue data object?

So I am trying to use the following component within Vue JS: Vue.component('careers', { template: '<div>A custom component!</div>', data: function() { var careerData = []; ...
0
votes
0answers
25 views

VUEJS + VUEX State reset everytime dispatch action

Everytime i dispatch action in vuex it remove my old state of users and add dispatch actions to playlist. I don't know what is problem so sharing screenshot you may understand in image what i am ...
1
vote
2answers
18 views

Vue-Multiselect and Laravel 5.3 options show up as JSON element

I have a Laravel 5.3 app and using vue-multiselect (Version 2.0.0-beta13) for displaying multiple selects. The select's options are fetched via an AJAX GET call to a given route (shortened for ...
2
votes
2answers
28 views

How can I access Vue JS props in a method in a component?

I may be wrong in my understanding of props but I can't seem to be able to pass a prop to a component and then use the value in a method? So far I am able to get data from a fixed API and output ...
0
votes
1answer
24 views

How can I define default imports for Stylus in nuxt.js

I import various helpers (mixins, vars, functions) into my component automatically to ensure they're always available to me and my team. Currently I use the vue-cli webpack template and to import ...
1
vote
1answer
30 views

Vue.js Update template from component method

I want to update a components template when a certain method of the component is called. Just like the resolve function, or the Vue.compile render option, or the v-html binding option (but then with ...
0
votes
1answer
11 views

Translate {{if @last}} handlebars templates to vue 2.0

I want to progressively switch from Backbone + Handlebars to Vue, but I am having some troubles with Handlebars templates. In one of my templates I have something like this: {{#each tHeads}} {{#if ...
0
votes
0answers
25 views

I can't use third party components in Nuxt.js/vue.js

I attempt use this library for my Nuxt project: getting-started I tried do how to written in docs, but in all variants get an error for exmaple: Unknown custom element: - did you register the ...
1
vote
2answers
38 views

Vue.js - error when rendering component

The data is on firebase, and I want to show only 1 object with [objectNumber] see {{ligler[1].name}} in the template, but when I do this it works but I get errors: Error when rendering component ...
0
votes
1answer
24 views

Restart Vue transition

I have defined a transition group in Vue <transition-group name="staggered-scale" tag="div" :css="false" @before-enter="animationBeforeEnter" @enter="...
1
vote
0answers
33 views

Laravel vue cannot access to relation data

I have customer data which has hasOne relationship with address table. Returned data format is like below. { "customer_id": 1, "last_name": "Cruickshank", "first_name": "Pearl", "phone": "+4 ...