Upload files to 'js'
This commit is contained in:
parent
b02cdcefa7
commit
45e9700d1a
22
js/vueApp.js
Normal file
22
js/vueApp.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
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; */
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
Loading…
Reference in New Issue
Block a user