Created
December 20, 2014 00:33
-
-
Save devdays/4767cea459357ea252fa to your computer and use it in GitHub Desktop.
Single Page App - Handling Errors Retrieving Data in Amplify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
amplify.request({ | |
resourceId: "easyData", | |
success: function (data, status) { | |
$("#products").text(data.products).show(); | |
}, | |
error: function (data, status) { | |
if (status === "abort") { | |
console.log("loading aborted"); | |
} | |
else { | |
console.log("error loading products " + status); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment