Angular 6: Property 'catch' does not exist on type 'Observable'?

前端 未结 8 1676
情深已故
情深已故 2020-12-15 18:39

I am upgrading my app to Angular 6. I am upgrading from Angular 4, but the code below is causing errors in Angular 6, where it worked fine

8条回答
  •  不知归路
    2020-12-15 19:43

    import 'rxjs/add/operator/catch';
    

    Or import Observable this way:

    import {Observable} from 'rxjs';
    

提交回复
热议问题