Summary
The Angular HttpClient assigns error responses to the error property of the HttpErrorResponse, which includes HTTP Status Codes such as Unauthorized (401), Forbidden (403), Not found (404), internal Server Error (500), etc. Additionally, Angular 4.3 has introduced the HttpInterceptor interface, which allows developers to intercept and modify HTTP requests globally.
1
2
This can be used to create an authentication service, add an interceptor to the HTTP_INTERCEPTORS array, and use the AuthService to log in and log out.
2
According to
Summary
Whenever it does it will return the error response with the HTTP Status Codes such as Unauthorized (401), Forbidden (403), Not found (404), internal Server Error (500), etc. The Angular assigns the error response to error property of the HttpErrorResponse .
The client-side code can also generate the error.
Angular HTTP Error Handling - TekTutorialsHub
tektutorialshub.com
Summary
Angular 4.3 has introduced a new set of HTTP tools, the HttpInterceptor interface, which allows developers to intercept and modify HTTP requests globally. This article explains how to use the HttpInterceptor to make authenticated HTTP requests, and how to create an authentication service, add an interceptor to the HTTP_INTERCEPTORS array, and use the AuthService to log in and log out. Additionally, Ryan Chenkie provides a book called Securing Angular Applications to help developers add authentication and authorization to their Angular apps.
Angular Authentication: Using the Http Client and Http Interceptors | by Ryan Chenkie | Medium
medium.com
AngularJS is what HTML would have been, had it been designed for building web-apps. Declarative templates with data-binding, MVC, dependency injection and ...
AngularJS
angularjs.org
Angular is a platform for building mobile and desktop web applications. Join the community of millions of developers who build compelling user interfaces with ...
Angular
angular.io
Complete Guide on Angular HTTP: Learn how to do common HTTP operations: GET, PUT, PATCH, ... user-friendly and helps to improve the type safety of our code.
Angular HTTP Client - QuickStart Guide
angular-university.io