Observable.of is not a function

后端 未结 19 729
旧时难觅i
旧时难觅i 2020-11-30 19:41

I am having issue with importing Observable.of function in my project. My Intellij sees everything. In my code I have:

import {Observable} from          


        
19条回答
  •  心在旅途
    2020-11-30 20:30

    For Angular 5+ :

    import { Observable } from 'rxjs/Observable';should work. The observer package should match the import as well import { Observer } from 'rxjs/Observer'; if you're using observers that is

    import {} from 'rxjs'; does a huge import so it's better to avoid it.

提交回复
热议问题