0

I have updated my app from Angular 5 to Angular 6, and also I had to update rxjs from 5 to 6. I used this LINK.

In my code I have: Observable.of(years) and I've changed imports from this: import "rxjs/add/observable/of"; to this: import { Observable, of } from "rxjs"; and still of cannot be found.

I have an error: Property 'of' does not exist on type 'typeof Observable'

DiPix
  • 5,755
  • 15
  • 61
  • 108

1 Answers1

3

Import this line in your component

  import { of } from 'rxjs';

Refer this link for rxjs 6 Changes

https://www.academind.com/learn/javascript/rxjs-6-what-changed/

Vignesh
  • 2,378
  • 3
  • 25
  • 48