Browse Source

add an import to the HTTP-Request.md

pull/7960/head
mehmet-erim 5 years ago
parent
commit
9dd4ee1674
  1. 2
      docs/en/UI/Angular/HTTP-Requests.md

2
docs/en/UI/Angular/HTTP-Requests.md

@ -286,6 +286,8 @@ export function handleHttpErrors(injector: Injector, httpError: HttpErrorRespons
- `httpError` is the second parameter of the error handler function which is registered to the `HTTP_ERROR_HANDLER` provider. Type of the `httpError` is `HttpErrorResponse`.
```js
import { throwError } from 'rxjs';
export function handleHttpErrors(injector: Injector, httpError: HttpErrorResponse) {
if (httpError.status === 500) {
// handle 500 errors here

Loading…
Cancel
Save