I am using angular 6 as well as read about pipe but didn't get any proper syntax to write zip and imported zip as well.
Error: Property 'zip' does not exist on type 'typeof Observable'.
import { zip } from 'rxjs/operators';
callZipFunction(): void {
Observable
.zip( this.commonService.GetMethodA(), this.commonService.GetMethodB())
.subscribe(([a,b])=>{
console.log(a);
console.log(b);
});
}
Try to import this way
import {Observable} from "rxjs/Observable";
import "rxjs/add/observable/zip";
Refrence
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With