Closed khakulov closed 11 years ago
amplify.request() should return jQuery.Deferred() object.
amplify.request()
jQuery.Deferred()
Example:
$.when(amplify.request("resource1"), amplify.request("resource2")) .then(function(data1, data2) { console.log("Resources are loaded!"); }, function() { console.log("Requests failed!"); } )```
We intentionally don't expose jQuery deferreds because amplify does not have a hard dependency on jQuery. You can wrap the requests in deferreds on your own if you want: https://gist.github.com/2424902
amplify.request()
should returnjQuery.Deferred()
object.Example: