0
I have this code over and over and I wanted to simplify it into a kind of plugin or function. Information I usually use, Type => 'get' or 'post' and the url, and the return I deal with in sequence with jquery.
$.ajax({
type: '',
url: '' ,
dataType : 'json',
//data: jsonString,
beforeSend: function () {
//SPINNER
},
success: function (data, textStatus, jqXHR) {
},
complete: function () {
},
error: function (jqXHR, textStatus, errorThrown) {
}
});
Because then , I’m thinking about Angularjs for the practicality of some things, the separation of layers is very well organized but I lack time to learn Angularjs and make a system with logins and control of access levels at the moment. But Thanks!
– Carlos Lopes
It’s Carlos, but you’ll see that the organization and practicality of Angular will save you a lot of time up front. Using auth0 libs also helps a lot! but anyway... good luck!
– idp