1

Im trying to retrieve chats from a firebase database with AngularFire Offline. To achieve this I wrote this function:

  getChat(chatId: string, batch, lastTimestamp?) {
    let query = {
      orderByChild: 'timestamp',
      limitToLast: batch
    }
    if(lastTimestamp) query['startAt'] = lastTimestamp;

    return this.afo.list('Chats/' + chatId, {query: query})
  } 

But when I'm trying to run it, I get this error:

ERROR TypeError: queryFn is not a function

Does anyone know what I'm doing wrong?

Im using:

  • "angularfire2": "^5.0.0-rc.6"
  • "angularfire2-offline": "^4.3.1"

Thanks in advance!

Lucas Mähn
  • 736
  • 2
  • 6
  • 19

0 Answers0