July 2018
Intermediate to advanced
420 pages
8h 46m
English
As mentioned earlier in this chapter, let's create our error handler service:
ng g service pages/shared/_services/httpHandleError
The previous command will create a new folder called _services inside the pages/shared folder for a simple reason: we will share this service between all services that we created inside the bikes, builders, and auth modules. The previous command also created a file called http-handle-error.service.ts.
Open ./Client/src/app/shared/_services/http-handle-error.service.ts and add the following imports:
import { HttpErrorResponse } from '@angular/common/http'; import { Observable, of } from 'rxjs'; ...Read now
Unlock full access