Aliaksei Litsvin
Aliaksei Litsvin

Reputation: 1261

Property 'zone' does not exist on type 'Observable<{}>'

I'm going through meteor-ionic tutorial and get this typescript error:

typescript: src/pages/details/details.ts, line: 35 
            Property 'zone' does not exist on type 'Observable<{}>'. 

Here is my component:

import { MeteorObservable } from 'meteor-rxjs';

......

MeteorObservable.call('updateRestaurantDetails',
  restaurant
).zone().subscribe((result) => {
  console.log(result);
});

......

And meteor-rxjs module version is set to "^0.4.8".

What I'm doing wrong with that? and how can I fix it?

Upvotes: 2

Views: 1019

Answers (1)

Sergey Rudenko
Sergey Rudenko

Reputation: 9235

Try importng zoneOperator and using it with pipe:

import { MeteorObservable } from 'meteor-rxjs';
import { zoneOperator } from 'rxjs';

......

MeteorObservable.call('updateRestaurantDetails',
  restaurant
).pipe(zoneOperator()).subscribe((result) => {
  console.log(result);
});

......

Upvotes: 2

Related Questions