4
I have the following function:
function getJson() {
$.ajaxSetup({
async : false
});
$.getJSON(baseURL + "/ObterCursos",
function(data) {
$.each(data, function(key, val) {
items.push({
"Codigo" : val.Codigo,
"Nome" : val.Nome
});
});
});
}
The first time it is called, it takes a while to bring the results, but the next times it works quickly. But I found that if I compile this code into a project Cordova
, even if called again and there are different values being returned from the request, this method does not update the results. What can I do to fix this?