Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.config(function(RestangularProvider) {
- // add a response intereceptor
- RestangularProvider.addResponseInterceptor(function(data, operation, what, url, response, deferred) {
- // check the response if it contains error or not.
- if (typeof(response.error) !== 'undefined') {
- alert('Your authentication Fail!');
- return false;
- };
- return response;
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement