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

0
votes
0answers
3 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
13 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 ...
-1
votes
0answers
14 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
1answer
15 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: { "...
0
votes
1answer
11 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
16 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
0answers
6 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
1answer
14 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
7 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
20 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
35 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
34 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
27 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
14 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
1answer
22 views

Rendering a Vue component in a bootstrap modal

I have a boostrap modal within a vue component like this: <div class="table-responsive" id="v-vuecomponent"> <div class="modal fade" id="bootstrapmodal"> <div class="modal-dialog ...
0
votes
0answers
41 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
21 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
51 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
12 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
34 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
23 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
21 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
28 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
30 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
17 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
21 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
27 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
10 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 ...
0
votes
2answers
36 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
22 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 ...
1
vote
2answers
21 views

Vue scope fresh

I just use vue.js with jquery. My situation is, I tried to inject sidebar html code (with vue syntax inside) to main.html with jquery. However, after I injected sidebar.html to main.html, vue.js could ...
2
votes
0answers
87 views

How does vuejs determine component props to update?

I am new to Vue.js so it seems like I'm just missing something here, but I can't understand why 1 of the 3 different approaches here doesn't update when the values changes. (This code is just me ...
1
vote
1answer
20 views

Simple html with vue.js not working

A beginner of vue.js and I followed this link: https://www.sitepoint.com/getting-started-with-vue-js/ Almost copy the code into my html.However it just not working.Can someone help me find what is ...
0
votes
2answers
28 views

VueJs / Life cycle and Javascript

I'm trying to generate a carousel with Siema, but I can't make it work when slides are generated with a v-for. I don't have any errors I just have the feeling the new Siema function is called before ...
2
votes
1answer
21 views

Vue axios promise scope is not binding to current component

How to bind functions in methods object. I believe if I use arrow function, it should auto bind with current object. However, it has its own scrope. Therefore, I cannot update data variables after ...
3
votes
2answers
54 views

Vue 2 - How to select the correct <select> option after the data is fetched from db

I'm using Vue 2 for a small blog project. I have a separate component for post's form and one of the form inputs is a select (for post's category). The select gets populated after the categories are ...
1
vote
1answer
15 views

multiple watchers same function vue.js

I have several watchers that should be calling the same function, is there way to list them all in once statement? watch: { 'param.a' (nv) { this.calc(); } ,'param.b' (nv) { ...
0
votes
1answer
21 views

socket.on not working in client side

I'm studying nodejs + vuejs + socket.io Testing sending message and reciving on server side and client side. On server side is working, I'm recieving the console(message: text) But, the console.log ...
0
votes
0answers
17 views

Vue.js - raw html (20+ pages) / reuse same component or destroy/recreate?

I have an app where the shell is in Vue.js, but the content is raw html coming through JSON. I'm concerned about memory leaks. Basic hierarchy: Main Container Current Channel Current subchannel ...