C
C
colorkid2017-05-03 19:56:42
JavaScript
colorkid, 2017-05-03 19:56:42

How to AJAX pass data to DATA instance of VUE JS V2?

Hello. There was a problem with data transfer to DATA via ajax, the problems did not go away. Here is an example https://jsfiddle.net/tx9dp4om/ , how to sew up the data transmitted via AJAX in DATA in this example?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kulakov, 2017-05-04
@colorkid

There may be a problem with the call context, try this:

created: function () {
    $.getJSON('data.json', data => {this.src = data})
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question