Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Property 'zip' does not exist on type 'typeof Observable'. Angular 6

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);
            });
        }
like image 802
Kiran Solkar Avatar asked Sep 02 '25 11:09

Kiran Solkar


1 Answers

Try to import this way

import {Observable} from "rxjs/Observable";
import "rxjs/add/observable/zip";

Refrence

like image 73
Sachin Shah Avatar answered Sep 04 '25 00:09

Sachin Shah