jeudi 26 mai 2016

how set timeout in method vueJs

hy all, I have quetion about vueJs
how I can settimeout in method vueJs, I have try like this but dosent work

fetchHole: function () { //get data },

 addHole: function () {
 //my query add new
setTimeout(function () { this.fetchHole() }, 1000)
},

and for msg error : Uncaught TypeError: this.fetchHole is not a function

thanks



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire