"Function expected" error when using ngFor to return a Firebase string, using Ionic 3 and AngularFire2

0

Galera,

I'm using Ionic3 and Angularfire2 as follows. I created a .ts file named servide where I export a champaign getAll function to get all the list of a table named 'colors' in Firebase.

 constructor(public db: AngularFireDatabase) {  }
  getAll(){
    return this.db.list('cores').valueChanges();
  }'

Then I use "getAll" at another time to fetch the list

export class HomePage {

  private listaCores;

  constructor(public navCtrl: NavController, public dbService: FirebaseServiceProvider ) {
  this.listaCores = this.dbService.getAll();
  }

When I do this it will be all right and such, but when I try to show the Colors list in the app effectively with the code below I have a "Function Expected" error.

  <ul>
    <li *ngFor="let c of listaCores|async">
      {{c.descCor}}
    </li>
  </ul>

Anyone have any idea what might be happening? I've looked in a lot of places and I have not really found the problem.

Thanks

    
asked by anonymous 02.11.2018 / 22:16

1 answer

0
Well, I found out what I needed to do. It was a problem in rxjs, that I had to do an update from 5.5 to 6.0, since the Angular was not compatible with 5.5. I used the comado below in the app folder and it was successful: npm install rxjs @ 6 rxjs-compat @ 6 --save

    
07.11.2018 / 04:15