I recently upgrade app from Angular 5 to Angular 8 and I change the imports rxjs to match the new version of rxjs which is rxjs 6 now.
I have the following import statement:
import { map, mergeMap, startWith, mergeMapTo } from 'rxjs/operators';
An I'm using it inside the component:
public myObservable: any;
myMethod() {
this.myObservable = timer(1, 1000);
this.myObservable
.mergeMapTo(this.myService.loadData(this.myId))
.subscribe((data) => {
this.myData = data;
}, (errRes)=>{
console.log(errRes);
});
}