23 lines
516 B
JavaScript
23 lines
516 B
JavaScript
new Vue(
|
|
{
|
|
el: "#app",
|
|
data: {
|
|
listeDeSons:null
|
|
},
|
|
created: function(){
|
|
this.loadData();
|
|
},
|
|
methods: {
|
|
loadData: function() {
|
|
var xmlHttp = new XMLHttpRequest();
|
|
xmlHttp.open( "GET", '/Sounds', false ); // false for synchronous request
|
|
xmlHttp.send( null );
|
|
this.listeDeSons = JSON.parse(xmlHttp.responseText);
|
|
/*this.$http.get('/Sounds').then(function(response){
|
|
this.listeDeSons = response.body; */
|
|
|
|
}
|
|
}
|
|
}
|
|
);
|