Property filter does not exist on type FirebaseListObservable


#1

I am using Ionic 2 and Firebase to build a chat app.

I add the following which is supposed to be used to add a filter:

import 'rxjs/add/operator/filter';
        ...
public af: AngularFire
        ...
    this.firelist = this.af.database.list('/chat/', {
      query: {
        orderByChild: 'negativtimestamp'
      }
    }).filter(item => item.memberIds === 'xxx');

However, I get the following:

[ts] Property ‘filter’ does not exist on type
’FirebaseListObservable<any[]>’.

ps. this.af.database.list(...) returns a FirebaseListObservable<any[]>. filter can be done on Observable but not on FirebaseListObservable.

Question

So how do I implement the filter on FirebaseListObservable because class FirebaseListObservable<T> extends Observable<T>?

Also

import 'rxjs/add/operator/map'
            ...
    this.af.database.list('').map(item => {});

has the following error:

[ts] Property ‘map’ does not exist on type ‘FirebaseListObservable<any[]>’.

More Info:

My package.json has:

 "rxjs": "5.0.0-beta.12",

enter image description here

Any help appreciated.

UPDATE

If you look at the following youtube tutorial, they do exactly what I want to achieve, but without the errors. Does anyone know why I get errors? I am using "angularfire2": "^2.0.0-beta.7-pre",.

enter image description here


#2

This issue was fixed in the following version:

"angularfire2": "^2.0.0-beta.7.1-pre",

Solution:

npm install firebase angularfire2@^2.0.0-beta.7.1-pre --save