We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f5aa207 commit 551d1c2Copy full SHA for 551d1c2
docs/content/guide/concepts.ngdoc
@@ -334,9 +334,9 @@ The following example shows how this is done with Angular:
334
var refresh = function() {
335
var url = YAHOO_FINANCE_URL_PATTERN.
336
replace('PAIRS', 'USD' + currencies.join('","USD'));
337
- return $http.jsonp(url).success(function(data) {
+ return $http.jsonp(url).then(function(response) {
338
var newUsdToForeignRates = {};
339
- angular.forEach(data.query.results.rate, function(rate) {
+ angular.forEach(response.data.query.results.rate, function(rate) {
340
var currency = rate.id.substring(3,6);
341
newUsdToForeignRates[currency] = window.parseFloat(rate.Rate);
342
});
0 commit comments