Skip to content

Commit 551d1c2

Browse files
lborgavNarretz
authored andcommitted
docs(guide/Conceptual Overview): change deprecated $http.success into .then
Using the standard then method instead success, because success is deprecated Closes angular#13309
1 parent f5aa207 commit 551d1c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/content/guide/concepts.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,9 @@ The following example shows how this is done with Angular:
334334
var refresh = function() {
335335
var url = YAHOO_FINANCE_URL_PATTERN.
336336
replace('PAIRS', 'USD' + currencies.join('","USD'));
337-
return $http.jsonp(url).success(function(data) {
337+
return $http.jsonp(url).then(function(response) {
338338
var newUsdToForeignRates = {};
339-
angular.forEach(data.query.results.rate, function(rate) {
339+
angular.forEach(response.data.query.results.rate, function(rate) {
340340
var currency = rate.id.substring(3,6);
341341
newUsdToForeignRates[currency] = window.parseFloat(rate.Rate);
342342
});

0 commit comments

Comments
 (0)