property 'forkJoin' does not exist on type 'typeof observable' - angular2

thegunner picture thegunner · Jul 18, 2016 · Viewed 17.6k times · Source

I was looking to experiment with a forkJoin mainly using the accepted answer here:

Angular2 Observable.forkJoin of observable variables - ReferenceError: Observable is not defined

I'm getting the above error message as forkJoin isn't available.

Anyone know why?

Answer

Dan Cancro picture Dan Cancro · Sep 8, 2016

Did you do this?

import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/forkJoin';

You have to add methods individually.