can.ajax

  • function
 

Make an AJAX request.

can.ajax(settings)

Parameters

  1. settings {Object}

    Configuration options for the AJAX request. The list of configuration options is the same as for jQuery.ajax().

Returns

{can.Deferred}

A can.Deferred that resolves to the data.

can.ajax( settings ) is used to make an asynchronous HTTP (Ajax) request similar to jQuery.ajax.

can.ajax({
    url: 'ajax/farm/animals',
    success: function(animals) {
        can.$('.farm').html(animals);
    }
});