getListData
Retrieves list of records for the given set.
function(set)
Returns a promise that resolves to a ListData for a particular set.
connection.getListData({complete: true}).then(function(listData){
connection.hydrateList(listData);
});
Parameters
- set
{Set}
:A object that represents the set of data needed to be loaded. For example,
{complete: true}
might represent the set of all completed records.
Use
Extensions like data/url make it easy to implement getListData
, but it can be as simple as:
var connection = connect([],{
getListData: function(set){
return new Promise(function(resolve, reject){
$.get("/api/todos",set).then(resolve, reject)
});
}
})