Closed daBishMan closed 6 years ago
@benlesh was kinda enough to say that anything that is being used outside of pipe method, will need to be imported "old style" basically.
I am closing this but I figured I put the answer here just in case someone else wanted to know.
Hello all,
I have the following code:
this.companyAutoSuggestDataProvider$ = Observable.create((observer: any) => { observer.next(this.searchParams.company); }).switchMap((company: string) => this.getAutoSuggestResults(company, AutoSuggestResultType.Company, 10));
if I import (import { switchMap } from 'rxjs/operators';) the above code fails, saying switchMap is not a function.
but if I import (import 'rxjs/add/operator/switchMap';) it works.
am I doing something wrong or is this a bug?