Angular - HTTP Client
Given this Angular service method:
What will the component receive if the HTTP request fails?
getData() {
return this.http.get('/api/data').pipe(
catchError(err => {
console.error('Error:', err.status);
return of([]);
})
);
}What will the component receive if the HTTP request fails?
