0
votes
1answer
21 views

Can't access Vue from js

I'm trying to create an App with Vue, and Vue-ressource Actually i need to use ressource to made auth system by an API call. But in my Auth.js (that i import into my login.vue) console said he can't ...
1
vote
1answer
23 views

Vue.js - How to properly watch for nested properties

I'm trying to understand how to properly watch for some prop variation. I have a parent component (.vue files) that receive data from an ajax call, put the data inside an object and use it to render ...
0
votes
1answer
20 views

VueResource Vue.http.get Response Status Code 0

im having this issue where i send a request to the API to retrieve all users, the login function is called(index.vue) when called it tries to go to api/users/all which in this case should return all ...
1
vote
0answers
25 views

proxyTable not used with axios

I am using cross-env npm package to run my dev server. I was using vue-resources before, but I read that it is not recommended anymore, so I switched to axios library. Unfortunately now proxyTable ...
2
votes
1answer
110 views

Switching from vue-resource to axios

With vue-resource, we could set the root url in main.js like so: Vue.http.options.root = 'http://localhost:3000/api' I tried replacing that with: axios.defaults.baseURL = 'http://localhost:3000/api'...
2
votes
1answer
73 views

Push to vuex store array not working in VueJS

I'm using Vuex to show a list of users from 'store.js'. That js file has array like this. var store = new Vuex.Store({ state: { customers: [ { id: '1', name: 'user 1',}, ] } }) I ...
0
votes
0answers
42 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 ...
0
votes
1answer
38 views

Display a specific element of an array after a query

I'm in trouble to display a specific element in an array with vuejs 2. After this query I obtain an array with 20 elements : this.$http.jsonp('https://api.instagram.com/v1/users/self/media/recent/?...
1
vote
1answer
38 views

Vue2: Why do I get infinite $http.get requests when I assign property from response?

I make $http.get call to back-end where I process data and return a result, and I want to assign property to this dynamically (the property is declared in data list): watch: { send_amount: ...
0
votes
2answers
40 views

Vue.js + vue-resource + vue-router = Lexical declaration error?

When trying to use Vue.js with vue-resource and vue-router a error is shown: ReferenceError: can't access lexical declaration `vm' before initialization As far a I tracked the error down it ...
2
votes
2answers
79 views

vue-resource get request not working on Laravel 5.3

It's a fresh Laravel 5.3 installation on MAMP. I'm trying to fetch data from a json API endpoint with vue-resource's get request. But it's returning an empty array. Here's my app.js I haven't used ...
3
votes
1answer
89 views

VueJs dev tools panel not showing

I started using vue dev-tools in my application but it is not visible when in developer mode in Chrome. I tried various solutions found on the dev-tools github page and in other places on the web, but ...
1
vote
1answer
110 views

How to do two way binding in custom directives in Vue.js 2?

Hi I am looking for a solution for two way binding in Vue.js 2. I found a answer here about two way binding but it is in Vue.js 1. I tried to work it in Vue.js 1. But it didn't work. Can anyone help ...
2
votes
2answers
48 views

VueRouter wait for ajax is done

I am building SPA and the problem is checking if user is admin or not. After Vue.auth.getUserInfo() I want to stop whole application and wait for API response, Vue.auth.user.isAdmin is always false ...
4
votes
1answer
50 views

Where is Vue.use(VueResource) string in Laravel project?

In many tutorials about VueJS I see this example: import VueResource from 'vue-resource'; Vue.use(VueResource); But in newly created Laravel 5.3 project I found only this code (bootstrap.js file): ...
3
votes
1answer
117 views

Call AJAX with Vue.js and Vue resource in Laravel

I'm making AJAX request in Laravel with Vue.js and Vue resource. I have view: {{Form::open(['method' => 'post', 'class' => 'form-inline', 'id' => 'main-form'])}} {{Form::text('param1', null,...
1
vote
1answer
38 views

Modifying instance data while ajax submit, reverts input data

I have the following method on my Vue instance: ajaxSubmit: function(event) { this.loader = true; var form = event.target; var action = form.getAttribute('action'); ...
4
votes
1answer
71 views

Load form data via REST into vue-form-generator

I am building a form, that needs to get data dynamically via a JSON request that needs to be made while loading the form. I don't see a way to load this data. Anybody out here who can help? JSON ...
2
votes
1answer
61 views

The content not shown properly in function callback in Vue.js

I've got two problems here. The first is that I can't get the star rendered properly. I can do it if I change the value in the data() function but if I want to do it in a function callback way, it ...
3
votes
1answer
47 views

Retry failed ajax request in vuejs

What's the best way to retry failed AJAX request in VueJS ? bulkDecline(requests, decliner) { requests = _.map(requests, 'id'); return Vue.http.post(`${baseUrl}/api/decline/${decliner}/bulk-...
-1
votes
1answer
38 views

v-for insert second v-for child

I have 2 tables in JSON containing the following. First table: [    {"Id": "1", "name": "Joe"}, {"Id": "2", "name": "Mark"} ] Second table: [ {"Student": "1", "note": "5", "assessment": "...
1
vote
0answers
56 views

vue.js $HTTP.GET return NULL PHP RESPONSE

I'm trying to consume an API and the $ http.get only returns NULL. I call a PHP that returns a json What nonsense am I doing? <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/...
1
vote
1answer
46 views

vue-resource $http not Work

I'm trying to use vue with vue-resource without success. what am I doing wrong? Follow the code I'm using CDN I'm starting with the vuejs and I appreciate the help. <div id="beerApp"> <ul&...
0
votes
0answers
218 views

VueJS2 with vue-resource creates infinite loop…?

I am using vue-resource with vuejs2 I have built a few components for some of my models.... in this case, I am using retailerOrder which has a one to many relationship with BillOfLadings. The ...
1
vote
0answers
29 views

Error while importing a data provider that uses VueResource before Vue.use(VueResource)

I was trying to import the store in the bootstrap file of Vuejs 2 app, inside the store, I'm using a data provider which uses VueResource... Doing so, I must import the store which uses VueResource ...
1
vote
0answers
73 views

VueJS 2 and Vue Resource - Chrome Crashes (infinite loop?)

Using VueJS2 with vue-resource Building a trait for handling CRUD functions. My model data is stored in data at key selectedClientModel (for example), and so, the component that uses this Trait ...
3
votes
1answer
88 views

Vue js POST fails onclick login “Response for preflight has invalid HTTP status code 404”

I'm Building a RESTfull API for a Vue app, i'm facing problem with authenticating user, i'm getting the below error XMLHttpRequest cannot load http://localhost:8000/oauth/token/. Response for ...
1
vote
0answers
80 views

Vue.js Vue-Resource Detect Timeout and resend post

Using Vue Resource with Vue.js v1 This is also running using vue-router and built with Browserfy. I have vue-resource working on the whole for post and gets but I have one particular one which ...
1
vote
2answers
109 views

How to access an API with Vue.js?

I'm new to JavaScript and Vue.js, and I'm having trouble accessing an api using Vue.js. The API I'm trying to access has JSON that looks like this: { "coord": { "lon": -88.99, "...
0
votes
0answers
26 views

Converting XML Blob in Javascript [duplicate]

I'm getting back a Blob of XML using Vue-Resource and would like to convert this into a Javascript Object Array. var books = [] this.$http.get('http://someurl/books.xml') .then((response) => { ...
0
votes
2answers
45 views

I am new to vue js … can't display loaded data from a php file

Template part : `<div class="col-sm-6" > <ul class="list-group" id="pos"> <li class="list-group-item" v-for="(itm, index) in items"> <strong>{{index}} : {{ itm.sub ...
-1
votes
1answer
104 views

vue-resource response body null laravel

I have some projects built with Laravel (laravel/framework v5.3.24) and Vue ^2.0.1. I ran composer update which updated laravel/framework to v5.3.26. Strangely after this update, my Vue components, ...
0
votes
1answer
90 views

Vue JS Component reattach or Cache

VueJS component doesn't get cached or atleast reattached after navigation. On refresh or launch everything gets attached and rendered well but after navigating to another page then back. The First ...
1
vote
1answer
118 views

Vue.js resource not working with Laravel 5.3 out-of-box config

Working with fresh install of Laravel 5.3 with Vue.js included and configured out-of-the-box: this.$http.get(url) returns error: TypeError: this$1.$http is undefined Replacing that with Vue.http....
1
vote
1answer
56 views

Vue.js working with xml feed

I starting working on my personal site using Vue.js. And now i'm suddenly stuck. I want to shot the five newest post om my Jekyll blog on the page. That's why i'm looking in the http://todayilearned....
0
votes
3answers
59 views

How to setup express route res.json(data) object and display the response in vue $HTTP call?

Actual data in the collection Using express: Mongoose model with mongodb collections called "comments" var mongoose = require('mongoose'); var Schema = mongoose.Schema; var Comment = new Schema({ ...
0
votes
1answer
72 views

Vue.JS $HTTP displaying data from an api

html> <head> <title>Vue App</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.3/vue.js"></script> <script src="https://cdnjs....
0
votes
1answer
60 views

Retry vue resource ajax calls using recursion

I'm trying to have my ajax call retry if it fails initially. It does it 3 times each time if the initial ajax call fails with a timeout of 5 seconds. The function is being imported on my vue component ...
0
votes
1answer
106 views

Electron Dialog send file to server with vue resource

I am building an electron app which handles file uploads, I am using dialog to get the files from user, I need to send the files to server but I am getting the files path but I get errors when sending ...
1
vote
2answers
265 views

CORS issue with Vue.js

I'm using: Vue 2.0.3 vue-router 2.0.1 vuex 0.8.2 vue-resource 0.7.0 And after trying to login to my page when using remote API, not the locally run one, I get cors error like following vue-resource....
0
votes
1answer
151 views

Vue & Laravel: Access and use eventHub

In resources/assets/js/app.js I have created eventHub Vue instance: require('./bootstrap'); var eventHub = new Vue(); Vue.component('todos-list', require('./components/todos/TodoList.vue')); ...
0
votes
1answer
44 views

Updating an array of Data in Vue JS

i'm trying to make a little DataTable in VueJS 2.0, and i've hit a bit of a roadblock, i'm making a call to a backend route to get some JSON from records in the Database, so far so good. I want those ...
1
vote
1answer
101 views

Update data using vue-resource

In my Vue component I have the following data: data() { return { revenueChart: '', limit: 12, labels: '', datasets: '' } }, Also, there is one method that ...
0
votes
2answers
82 views

How to create multiple Vue components inside of Bootstrap tabs?

I am using the togglable tabs component in Bootstrap. I would like a table in each tab. Each one is displaying a table of email logs (Click Event, Open Event, etc). I would also like each table to be ...
1
vote
1answer
100 views

Using Vue-Resource in Vuex store; getting maximum call stack size error

I'm trying to pull an array from my api to a component using vuex but I'm at a loss and probably in over my head in attempting this. With the api being accessed directly from a component I had it set ...
1
vote
1answer
217 views

Params field is empty in $router.push

I use this this.$root.$router.push({ path: '/dashboard', params: { errors: 'error' }, query: { test: 'test' } }) in my component to redirect to other URL when some error has occured. ...
2
votes
1answer
310 views

Vue 2 and Vue-Resource [Cannot read property 'get' of undefined(…)]

Recently upgraded to Vue-2 using Broswerify and Vueify. In the main app I had to require vue/dist/vue.js instead of 'vue' since im not using Webpack, however now when I use Vue.use(require('vue-...
0
votes
1answer
110 views

Any Idea how to do Session based authentication in laravel 5.3 using vue js and vue router

My biggest problem for now is the authentication my head aches about this because im using api to fetch and send data to the server using vue so ive tried doing the login thing with the AUTH ...
1
vote
1answer
233 views

vue-router 2, how to fetch routes via ajax?

How do I create the routes array dynamically, after fetching it via ajax? Is there a way to add/push new routes to the router after it has been initialized? This doesn't work: new Vue({ el: '#app'...
0
votes
0answers
62 views

Vue.js: v-model working only for the first select option

I want to filter data from the database using vue.js In the blade file I have the following: <div class="row" id="filterUnits"> @{{message}} {!! Form::open() !!} <div class="...