Created
December 26, 2014 17:52
-
-
Save devdays/5587cb5d9b0eff1f48cf to your computer and use it in GitHub Desktop.
Object JavaScript - Promise with Q and jQuery
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
var qPromise = Q($.getJSON("data/products.txt")) | |
.then(function (products) { | |
$("#products").text(JSON.stringify(products)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment