Running this code the sequences of alerts I have is begin, outside, final e inside
, how to solve this ??
addLine(){
alert('begin')
jQuery.get('database/addClube/'+this.clube);
jQuery.get('database/getClubes', function(data){
this.list = data;
console.log(this.list);
alert('inside')
});
console.log(this.list);
alert('outside')
for(item in this.list){
//alert(item);
}
this.clube = '';
alert('final')
},