Open Closed

abp.ajax vs - some questions #7158

dexmox created

Could someone please tell me what the benefits and differences are and which is better to use for doing ajax table updates and why ?

_personService.createPerson(person).done(function () {
                 // some ajax table updates and stuff here
            }).always(function () {


    url: '/People/SavePerson',
    data: JSON.stringify(newPerson)
}).done(function(data) {
    abp.notify.success('Created new person with id = ' + data.personId);
    // some ajax table updates and stuff here

Thanks in advance.

1 Answer(s)
  • 0
    ismcagdas created

    Hi @dexmox

    We suggest to use when possible since it handles urls, method types and formatting data objects to json string for you. It also provides more readable code to developers.

    If you are using Angular version, it is also type-safe.