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

前端 未结 8 1654
情深已故
情深已故 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:36

    you will need to import all operators you are using.

    import 'rxjs/add/observable/of';
    import 'rxjs/add/observable/throw';
    import 'rxjs/add/operator/catch';
    

提交回复
热议问题