Actually I have imports messed up. In latest version of RxJS we can import it like that:
import 'rxjs/add/observable/of';
More Related Contents:
- What is the difference between Promises and Observables?
- What is the difference between Subject and BehaviorSubject?
- Angular HTTP GET with TypeScript error http.get(…).map is not a function in [null]
- Avoiding nesting subscriptions in Angular 2+?
- Convert Promise to Observable
- Observable type error: cannot read property of undefined
- RxJS: takeUntil() Angular component’s ngOnDestroy()
- Angular Subscribe within Subscribe
- How to create an RXjs RetryWhen with delay and limit on tries
- Handling refresh tokens using rxjs
- Best way to “flatten” an array inside an RxJS Observable
- How to make an http call every 2 minutes with RXJS?
- Angular 7 – nesting Observables
- Angular subscribe elegant
- Making sure observables in for loop are all finished before executing other code
- Best way to import Observable from rxjs
- rxjs/Subject.d.ts error : Class ‘Subject’ incorrectly extends base class ‘Observable’
- Rxjs Retry with Delay function
- How to make nested Observable calls in Angular2
- tap() isn’t triggered in RXJS Pipe
- What is pipe for in RxJS?
- How to throw error from RxJS map operator (angular)
- How to return observable from subscribe
- Property ‘toPromise’ does not exist on type ‘Observable’
- How to receive blob responses using Angular’s 2+ @angular/http module?
- Angular 5 to 6 Upgrade: Property ‘map’ does not exist on type Observable
- Angular2 watch for 302 redirect when fetching resource
- FormControl.detectchanges – why use distinctUntilChanged?
- How to pass results between chained observables
- Do we need to unsubscribe from observable that completes/errors-out?