Property 'catch' does not exist on type 'Observable' in angular 6/7/8/9 Fixed
Error - Property 'catch' does not exist on type 'Observable<any>' in Angular.
Root Cause - When you upgrade your angular application from Angular 2 or Angular 4 to Angular 6 or greater versions then you can face this error.
As From Angular 5 onwards there were many changes in rxjs. I
Solution - To fix this error change your import syntax as below. change 'catch' to 'catchError'.
import { Observable } from 'rxjs';
import { catchError, map } from 'rxjs/operators';
Thanks
Comments
Post a Comment