运行时错误:对象(…)不是函数Ionic/Firebase/Angular

运行时错误:对象(…)不是函数Ionic/Firebase/Angular,angular,typescript,firebase,firebase-realtime-database,Angular,Typescript,Firebase,Firebase Realtime Database,我正在创建一个Ionic应用程序,其中有我想要显示的信息列表,我正在使用Firebase作为我的数据库(实时数据库) 但我一直在犯这样的错误: 对象(…)不是函数 我不知道为什么,因为代码看起来很好(我检查了angularfire2 git以确定) 下面是代码: list.ts import { Component } from '@angular/core'; import { NavController, NavParams } from 'ionic-angular'; import {

我正在创建一个Ionic应用程序,其中有我想要显示的信息列表,我正在使用Firebase作为我的数据库(实时数据库)

但我一直在犯这样的错误:

对象(…)不是函数

我不知道为什么,因为代码看起来很好(我检查了angularfire2 git以确定)

下面是代码:

list.ts

import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import { AngularFireDatabase } from 'angularfire2/database';


@Component({
  selector: 'page-list',
  templateUrl: 'list.html'
})
export class ListPage {

  informationslist:any;

  constructor(public navCtrl: NavController, public navParams: NavParams,
  private afDB: AngularFireDatabase) {



      try{
      this.informationslist = afDB.list('information',  (ref) => 
      ref.orderByChild('datetime')).valueChanges();

      }catch(e){

        console.log(e);
      }


  }



}
list.html

<ion-header>
  <ion-navbar>
    <button ion-button menuToggle>
      <ion-icon name="menu"></ion-icon>
    </button>
    <ion-title>List</ion-title>
  </ion-navbar>
</ion-header>

<ion-content>

<ion-list>
  <ion-item *ngFor="let i of informationslist | async">{{i.title}}</ion-item>
</ion-list>



</ion-content>

列表
{{i.title}}

请提供rxjs的版本。在大多数情况下,它的错误版本可能有问题。我认为当前的angularfire2需要rxjs版本6.0.0或更高版本。完整的javascript堆栈也很有用


此外,如果您以前使用了另一个RXJS版本,现在尝试升级,请考虑迁移指南:

< P>可以提供RXJS的版本吗?在大多数情况下,它的错误版本可能有问题。我认为当前的angularfire2需要rxjs版本6.0.0或更高版本。完整的javascript堆栈也很有用


此外,如果您使用了另一个RXJS版本,现在尝试升级,请考虑迁移指南:

RXJS 5.5.10(从包.jSON)升级到使用我的迁移向导链接的版本6。迁移指南现在在RXJS 5.5.10(从包.jSON)升级到使用我的迁移指南链接的版本6。