Reputation: 1612
Spend some time trying to figure out why my plunker doesn't work :(
https://plnkr.co/edit/JHODQeWQtYmz4UkYzFds?p=preview
error append on following line
let load = this.actions$.filter (action => return action.type==START_LOADING);
actions$ is defined like this :
private actions$ : BehaviorSubject<Action> = new BehaviorSubject<Action>({type: null, payload: null});
and I import this
import { Subject } from "rxjs/subject";
import { Observable } from "rxjs/Observable";
import { BehaviorSubject } from 'rxjs/subject/BehaviorSubject';
in debugger of Chrome, I see that some functions are available (map, lift, scan, etc) but not filter.
Somebody know why filter is not available on BehaviorSubject ? I imagine that is a simple mistake but I don't find it ;)
Upvotes: 5
Views: 6499
Reputation: 202196
I think that you should import the filter
operator:
import 'rxjs/add/operator/filter';
Here is your updated plunkr with this import: https://plnkr.co/edit/37JEG4aQ7qmQuaPchB4Z?p=preview.
See this question for more details:
Upvotes: 14