Ionic, Fetch data to firebase


#1

Hello, I’m trying to fetch data to firebase and it is not working. This is what I have:
FirebaseProvider

import { AngularFireDatabase, AngularFireList } from 'angularfire2/database';
import 'rxjs/add/operator/map';
@Injectable()
export class FirebaseProvider {
	events: AngularFireList<any> = null;
  constructor(private _af: AngularFireDatabase) {
    this.events =  this._af.list('/events').valueChanges();
  }
  public listEvents(){
      return this.events;   
  }
}

This is Events list Page:

export class ListEventsOnePage {
  public events: any[];
 constructor( public db: FirebaseProvider) {
    this.events = this.db.listEvents();
    console.log("eventsResult " + JSON.stringify(this.events));
  }
}

This is what it produces as result :
eventsResult {"_isScalar":false,"source":{"_isScalar":false},"operator":{}}

When I add functions like .then(), .on(), .snapshotChanges(), … it says they are not functions.

Please help