jquery - Angular - Read Every Response Recieved from API -


i want show flash message in angular , php(api) app.

i wondering if can scan every response received api , if server returning json array column 'flash' should automatically read , show flash message.

for example, if response 'flash' => 'username or password invalid' should show flash username or password invalid automatically without telling service show it

you can monitor , watch every http call through angular's $http service implementing interceptor. can review documentation here.

to peek each response received want implement response , responseerror


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -