0
The following error is being presented:
Uncaught Syntaxerror: Unexpected Identifier
on line 12. I would like someone to help me correct this mistake.
The JS is as follows:
document.addEventListener("deviceready",onDeviceReady,false);
function onDeviceReady(){
var vm = new Vue({
el: '#app',
data:{
noticias: []
},
methods:{
sync:function(){
$.ajax({
dataType: 'json'
url: 'http://yhsoftware.esy.es/read.php',
success:function(dados){
localStorage.setItem('noticias',JSON.stringify(dados));
vm.setNoticias();
alert("lista de noticias atualizada!");
},
error:function(){
alert("ocorreu um erro durante a conexão com o servidor!");
}
}};
},
setNoticias:function(){
this.noticias = JSON.parse(localStorage.getItem('noticias'));
console.log(this.noticias);
}
},
ready:fuction(){