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) | vue.js jobs

1
vote
2answers
11 views

vue how to assign value in html?

This is my usecase: <div v-if="getObject()"> <div v-if="getObject().someBoolean"> {{getObject().someOtherKey}} </div> </div> I don't want to be calling ...
1
vote
1answer
29 views

Vue - webpack vue-loader configuration

I keep getting error whenever I want to build a file. What is a reason of it? It seems that .vue file is not recognizable by webpack, but webpack configuration file looks properly. webpack error ...
2
votes
2answers
33 views

Optional parent element in Vue.js

Is there any way to define the parent element as optional based on a condition but always show its children in Vue.js? For example: <a :href="link">Some text</a> What I would like to ...
0
votes
2answers
21 views

Wrapping three specific routes with the same component in VueJS

I have three routes, /login, /signup and /forgot and their corresponding components which only contain the basic forms you'd expect. I would like those components to be contained within a landing page ...
0
votes
0answers
10 views

Vue.js testing with Capybara

I use vue.js in a Rails app, and I'd like to run tests using Capybara and Poltergeist (though I'm open to use another driver if it is the problem here). When running a simple test: visit('/...
0
votes
1answer
33 views

Presentation Component in Vue2

I want to display all my forms and info pages in floating sidebox. I don't want to copy and paste the floating sidebox html to all the places. So I want to create a component which acts as container ...
0
votes
1answer
16 views

Different behavior when component is created via Vue.extend or via “new Vue()”: view-model's data and methods not accessible if created via new Vue

I have a simple component Hello: <template> <div class="hello"> <h1>{{ msg }}</h1> </div> </template> <script> export default { name: 'hello', ...
0
votes
2answers
21 views

How to import a component in Vuejs 2

I'm really confused about importing a VueJs component. I'm using Vuejs 2.2.4, and I need to import a Vuejs component. Here is my app.js: Vue.component('Test', require('./Test.vue')); const app = ...
0
votes
0answers
20 views

Going back to States like Undo Redo on Vue.js vuex

How do I make undo redo using Vuex . I am working on a pretty complex app and Vue dev tools helped me a lot to switch between state .so I want that feature on my app. how can I achieve this; this;
0
votes
1answer
25 views

VueJs - Nesting custom components

I have some proble. I'm going to create few components, and I try to nest them. So I have an example <body> <div class="app"> <image-slider> <slide image="...
1
vote
1answer
17 views

Call great grand children component method

I got a set of nested components as follows in Vue 2.2.1: <Root> <VForm> <Accordion> <Panel> <Stripe ref="stripe"> And I need to call a method ...
1
vote
1answer
17 views

How to show/hide v-for elements in a dynamic array?

I'd like to show/hide each todo detail in a boxe,when corresponding todo button is clicked. In reality both todos and todoDetails are obtained dynamically from server. The script is like this var ...
0
votes
0answers
15 views

Why vue can't detect the change of “vm.items[indexOfItem] = newValue”?

When I read the guide from Vue, it said: Vue cannot detect the following changes to an array, e.g. vm.items[indexOfItem] = newValue. But when I read the code, I found this: var Observer = ...
0
votes
1answer
13 views

Can we use v-for in a custom component's template in vuejs?

use following code in html, it works: <div v-for="i in [1,2,3]" >{{i}}</div> but when used in a component template: Vue.component('test', { template: '<div v-for="i in [1,2,3]...
1
vote
1answer
6 views

Vue.js blank page on server but on localhost it's fine

I have a problem with blank screen on server. I have this inside main.js: import Vue from 'vue'; import axios from 'axios/dist/axios'; import Login from './components/Login.vue'; import Register ...
0
votes
1answer
14 views

How to download a file from json api backend using vue?

I have a rails api backend with vue.js frontend with simple jwt authentication. So, there're 2 servers localhost:8080 and 3000 How can I download a pdf file from a link that goes with json response. ...
0
votes
3answers
280 views

Vue.js Cannot read property 'split' of undefined

I'm showing page breaks within my vue.js application. <div class="Message__body__message"> <p v-for="line in message.message.split('\n')" track-by="$index">{{ line }}<br></p&...
0
votes
1answer
11 views

VueMdl components not registered correctly

I'm using Vue 2.0 + VueRouter and trying to integrate VueMdl (https://posva.net/vue-mdl/#/usage) components into my project. The site is running as a static resource served by Spring Boot using an ...
0
votes
1answer
18 views

socket.io and vue.js fetching data

I am trying to fetching the data of vue.js using this fetchData: function () { socket.emit('getAllSongs') socket.on('allSongs',function(data) { ...
0
votes
3answers
561 views

Use watch in store pattern

Here is what I wanna do: I have a component, one of its data is read from a shared object, and every time the value changed, I wanna know and do something about it. So I decided to use watch to that ...
0
votes
1answer
24 views

VueJS conditionally add an attribute for an element

In VueJS we can add or remove a DOM element using v-if: <button v-if="isRequired">Important Button</button> but is there a way to add / remove attributes of a dom element eg for the ...
1
vote
1answer
2k views

Vue js unknown custom element

I'm a beginner on Vue JS and I'm trying to create an app that cater my daily tasks and I run unto a Vue Components so below is what I've tried but unfortunately it gives me this error vue.js:1023 [...
-1
votes
0answers
17 views

Vuejs has an unexpected error in the Explorer

enter image description here there is an error in the code. this is our porject from github url : https://github.com/shitKorea/shit-algorithm
0
votes
0answers
15 views

navigation gaurd not working properly

I store the log in status of the user in my store.js (using vuex for state management) When the user is logged in the login status is set to true in store.js I check if the user is logged in and ...
-1
votes
0answers
32 views

How do I hide and show a Bootstrap modal with Vue 2?

I'm trying to configure a Bootstrap modal inside my template (component) with VueJS. Right now it's working via the normal usage of data-target and id. This is what I got: Square.vue: <div ...
0
votes
1answer
41 views

Vue.js to display Pusher data Laravel 5.4

I'm using vue.js, pusher, and laravel to build a real-time chat application. I can receive the information from Pusher just fine; I can output the json into the console and it has the right ...
1
vote
1answer
14 views

I get unexpected token while doing gulp watch

this is my app.js file import Vue from 'vue'; import Posts from './Components/Posts.vue'; new Vue({ el : '.container', data : { }, components : { Posts } }) Posts.vue <script ...
0
votes
1answer
13 views

Set current request route in vue-router for SRR in server-side with Node.js

Introduction I have this Node.js code from a function that handle the request/response. To explain my problem, I will use Express.js example. That piece of code is not a part of my problem but I can ...
0
votes
1answer
45 views

VueJS how to update data on selection

In a VueJS 2.0 I want to update the rendering of items using a v-for directive when a selection changes. html: <main> {{ testvalue }} <select v-model="selected.name"> <option v-...
0
votes
1answer
34 views

In vue.js component, how to use props in css?

I'm new to vue.js. Here is my problem: In a *.vue file like this: <template> <div id="a"> </div> </template> <script> export default { name: 'SquareButton', ...
0
votes
0answers
13 views

how to debug main process in electron-vue project?

We are using electron-vue https://github.com/SimulatedGREG/electron-vue boilerplate in our project and have a lot of business logic into main process. There is main process debugging of simple ...
0
votes
1answer
17 views

WebPack HTML and File Loader with programmatic img src

I'm using WebPack 2 and we're trying to specify an image name programmatically with Vue, and bind it in the HTML. Since the image name and path isn't bound until run-time, HTML and File Loader doesn't ...
0
votes
1answer
12 views

Possible to include an html “partial” template (not embedded in js) in Vue 2 router?

I know I can do this: const Foo = { template: '<div>bar</div>' } const routes = [ { path: '/foo', component: Foo } ] But I'd rather somehow include an html file like: ...
19
votes
4answers
8k views

How to integrate WebStorm with Vue.js

WebStorm didn't support Vue.js natively (at least for now - Apr, 2016). I've find few advice how to improve WebStorm experience. Now I want to list them in one place (I'll answer my own question ...
1
vote
1answer
24 views

How to access data from computed property Vue.js

I'm using Vue.js and when I try to access a variable from data inside a computed property, it returns undefined. Here's the code: <script> export default { name: 'app', ...
0
votes
0answers
19 views

Create sliding left effect using Vuejs animation

I've read this official document about Vuejs animation. But using it css hooks, I can only make element appear/disappear with fade and different duration. <div id="demo"> <button v-on:...
0
votes
1answer
21 views

Brunch and VueJs with Promise polyfill

My code doesn't work in IE and I am having trouble getting to the bottom of it. I need a Promise polyfill, so my goal was to import "babel-polyfill" at my main app.js and see if this worked. I am ...
8
votes
2answers
1k views

What is a proper way of end-to-end (e2e) testing in Vue.js

Of cause I can use selenium-standalone with xpath to test an app. But testing SPA could be challenging sometime. But, for example angularjs's team provides protractor for this purpose. The reason ...
3
votes
1answer
30 views

Handling single page application url and django url

I have a single page application created in Vue.js that utilizes the HTML5 History Mode for routing, and the html file is served with Django. The urls.py of django is like so: urlpatterns = [ ...
2
votes
0answers
23 views

Attach validation rule to form field programmatically

I am using VeeValidate to do some validation on a form made with Vue.js. I have it set up to display a span with the error message related to the input where the error occurred. <div class="input-...
1
vote
1answer
23 views

How i can add click handler function to dynamically link in Vue?

Here in Vue component I receive dynamically message from server: module.exports = { data() { return: { windowText: '' } }, methods: { showCancelEntrieWindow(){ this.$http.post('...
1
vote
0answers
28 views

Developing and deploying Vuejs app with django

I have built a fairly simple web app in Vuejs, which was running with its default npm run dev command with webpack. Vue app was utilizing the api from Django that I have built using django-rest-...
1
vote
0answers
10 views

Unit testing in Vuex throwing AssertionError to equal { Object (type, text) }

So far unit testing Vuex actions have been a nightmare, I can't seem to understand what it's actually looking for. I'm following https://vuex.vuejs.org/en/testing.html and using their action helper ...
0
votes
0answers
21 views

Vue.js 2.0 Cannot access store in actions.js

Basing the learning experience on Learn Vuex by Building a Notes App (updated for 2.0 by dakmau) Here's my code: https://gitlab.com/Joshfindit/ingest-Frontend-only-WithComponents/tree/frontend-...
0
votes
1answer
19 views

Vue router navigation gaurd from within the component

I use vuex from centralized state management in my vuex store.js i store the login status as a boolean value like below export const store = new Vuex.Store({ state: { loggedIn: false, userName: '...
0
votes
1answer
14 views

Vue / Vue-bulma - nprogress: Progress bar loads forever on guard/redirect

nprogress works just fine in every other regard, but on redirect to /login it spins forever. I've attempted the showProgressBar: false to no avail. If user is logged in they'll be redirected to /...
1
vote
1answer
19 views

Dynamically update one dropdown by using another in Vue 2.1

I have a form built in Vue v.2 with an address section. I'm trying to get the State dropdown to autopopulate based on what's selected in the city. When a user selects 'Atlanta', 'Georgia' should show ...
0
votes
1answer
16 views

Pass range input value on change in Vue 2

In Vue 2: I have an App component, which has a Slider component: App.vue <template> <div> <Slider :foo="store.foo"></Slider> </div> </template> &...
1
vote
2answers
74 views

VueJS dynamic property name not updating value

I am trying to implement an associated array combined with accessing the property within the value, the key is based on the value of the campaign object. <li v-for="campaign in campaigns"> &...