spring-guides / tut-spring-security-and-angular-js

Spring Security and Angular:: A tutorial on how to use Spring Security with a single page application with various backend architectures, ranging from a simple single server to an API gateway with OAuth2 authentication.

Home Page:https://spring.io/guides/tutorials/spring-security-and-angular-js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Angular code uses old deprecated $http call

chaitanyathengdi opened this issue · comments

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.

I know. Pull requests welcome.