108,131 questions
52
votes
4
answers
62k
views
Vue JS Watching deep nested object
Disclaimer: This is my first attempt at building an MVVM app I have also not worked with vue.js before, so it could well be that my issue is a result of a more fundamental problem.
In my view I have ...
-1
votes
1
answer
847
views
Vue JS View layer not updating
$(function(){
var app = new Vue({
el:"#app",
data: {
testData: globalObj
}
});
});
html:
<div id="app">
<span v-text="globalObj.value"></span>
</...
204
votes
6
answers
165k
views
[Vue warn]: Cannot find element
I'm using Vuejs. This is my markup:
<body>
<div id="main">
<div id="mainActivity" v-component="{{currentActivity}}" class="activity"></div>
</div>
</body>
...
3
votes
1
answer
4k
views
Vue.js: Calculate average and update field
I am trying to calculate the average of sub grades that aren't equal to zero and setting a binded input to that new average value.
The sub grades have a v-on directive that calls a calcAverage() ...
3
votes
1
answer
2k
views
Displaying HTML if data is empty
HTML:
<div id="demo">
<h1>{{title | uppercase}}</h1>
<ul>
<li v-repeat="todos" v-on="click: done = !done" class="{{done ? 'done' : ''}}">
{{...
2
votes
1
answer
7k
views
VueJS - How to initialize a template dynamically with the result of an ajax call
I want to load the template for a VueJS component dynamically. I'd like to make an AJAX call using jQuery, and whatever the server returns should be the template of the VueJS component. Here's a ...
3
votes
3
answers
22k
views
Vue JS - Putting Json on data
I want to put my JSON data into Vue data, and a display, why can't I get to work?
compiled: function(){
var self = this;
console.log('teste');
$.ajax({
url: 'js/fake-ws.json',
...
1
vote
1
answer
3k
views
Vue.js: Default data in component is always overridden with v-with
I have a language selector view that includes a dropdown component. I want to set a default property (isOpen) in the dropdown component and then include computed data from the language selector, that ...
2
votes
1
answer
2k
views
Angular/Vue.js loop through two objects in same directive
I don't know if what I'm trying to do is possible. I'm trying to create an Angular directive that repeats over a data object and prints out its values as well as the values of a second unrelated ...
3
votes
4
answers
2k
views
Using v-attr with attribute that contains colon 'xmlns:href' does not compile
I am trying to use v-attr to add an attribute that contains a colon which is a delimiter for Vuejs key:value. It doesn't compile.
<svg>
<use xmlns:xlink="http://www.w3.org/1999/xlink"
...
1
vote
1
answer
3k
views
VueJS transitions using v-view
I'm looking to animate the appearance of new elements and the disappearance of old elements when you change the component a v-view element is bound to. However because changing the ViewModel actually ...
7
votes
2
answers
13k
views
Dynamic component and template loading with VueJS
I'm considering using VueJS for a multi page website. In the official example of routing, they show that you can dynamically change the template and component based on the URL, but they still have all ...
1
vote
1
answer
8k
views
vue.js form validation and ajax submit
I'm trying to use vue.js to do form validation and when the element is valid to submit it via ajax. But I can't get past the validation part.
My html:
<div id='form' 'v-on'="change:updateForm"&...
0
votes
1
answer
100
views
Component inserted with tag name doesn't work
I'm working on a component that will be inserted into the DOM with a tag name like so: <component></component> instead of the v-component directive. For some reason it's not working.
http:...
24
votes
4
answers
8k
views
Use cases for vue.js directive vs component?
When should I use a directive vs a component in vue.js? I'm implementing some stuff from Bootstrap and it looks like I could do it either way (I'm starting with the dropdown menu).
I get the feeling ...
35
votes
4
answers
25k
views
vue.js - Organize big single page application with multiple views
I'm playing with new MVVM framework - Vue.js (http://vuejs.org/).
It was really nice in simple examples and demos but now I'm trying to create big SPA with multiple views and I'm realizing that the ...