Angular 6 RXJS Import Syntax?

后端 未结 5 1489
北恋
北恋 2020-12-08 09:24

I\'m migrating an Angular 5 app to the latest CLI and Angular 6 RC and all of my Observable imports are broken. I see that Angular 6 changes the way the imports work, but I

5条回答
  •  时光取名叫无心
    2020-12-08 10:12

    You just need to import like operators

    import { Observable } from 'rxjs';
    import { map, catchError, timeout } from 'rxjs/operators';
    

提交回复
热议问题