Angular code uses old deprecated $http call
chaitanyathengdi opened this issue · comments
chaitanyathengdi commented
I just noticed that Angular code in this tutorial is still using calls to $http service like these:
$http.get('/myurl').success(function(data){
myctrl.myobj = data;
});
These calls are deprecated and should be replaced with .then()
calls:
$http.get('/myurl').then(function(success){
myctrl.myobj = success.data;
}, function(failure){
console.log(failure.error);
});
Old calls work, but are no longer recommended.
Dave Syer commented
I know. Pull requests welcome.