I am having issue with importing Observable.of
function in my project. My Intellij sees everything. In my code I have:
import {Observable} from 'rxjs/Observable';
and in my code I use it like that:
return Observable.of(res);
Any ideas?
I am having issue with importing Observable.of
function in my project. My Intellij sees everything. In my code I have:
import {Observable} from 'rxjs/Observable';
and in my code I use it like that:
return Observable.of(res);
Any ideas?
I am using Angular 5.2 and RxJS 5.5.6
This code did not work:
Below code worked:
Calling method:
I think they might moved/changed of() functionality in RxJS 5.5.2
This should work properly just try it.
If you are using Angular 6 /7
And then instead of calling
just use
Somehow even Webstorm made it like this
import {of} from 'rxjs/observable/of';
and everything started to workYou could also import all operators this way: