I faced similar problem with rxjs
map
operator. Currently I'm using Angular 6. To know which version you are using:
ng --version
or
ng -v
If you are also using angular 6, then please checkout https://www.academind.com/learn/javascript/rxjs-6-what-changed/
- Different internal structure that requires you to change your import statements
- pipe() as a method to chain your operators, the old way of chaining them will not work
Let's say you use map for http.get
method:
import { map } from 'rxjs/operators';
private url = "some site...";
constructor(private http: HttpClient) { }
dailyForecast() {
return this.http.get(this.url).pipe(map(result => result));
}
NOT: this.http.get(this.url).map(result => result);