I have a system that works with JWT and when the token expires im showing
the user a modal to login again and the make the last http request that he
asked before his token expires. thats work fine but i need a way to update
the data in the page too when the response come back and thats not happen
and i understand why, there is way to do it?
lets say i have protected route that give the auth user all his posts.
$http.get("posts" ).then(function(res) {
$scope.posts = res.data;
})
the auth interceptor:
'responseError': function (rejection) {
if (rejection.status === 400) {
var http = $injector.get('$http');
var modal = $injector.get('$modal');
var modalInstance = modal.open({
templateUrl:'app/auth/login/loginModal.html',
controller: 'loginModalController',
size:'lg'
});
modalInstance.result.then(function() {
return http(rejection.config);
});
}
}
so how can i update the scope.posts too after user is login. its not give
me anything if the http request is sended but the data not render.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.