base-chat icon indicating copy to clipboard operation
base-chat copied to clipboard

query error

Open anonnoisy opened this issue 7 years ago • 6 comments

getMessages(): FirebaseListObservable<ChatMessage[]> { // query to create our message feed binding return this.db.list('message',{ query: { limitToLast: 20, orderByKey: true } }); }

anonnoisy avatar Jan 29 '18 08:01 anonnoisy

Hello i have the same error, how can I fix it ?

anthony-coplo avatar Jan 29 '18 15:01 anthony-coplo

same :/

JBuckGuy avatar Mar 08 '18 18:03 JBuckGuy

Same here, please help

sameeranihathe avatar Mar 29 '18 01:03 sameeranihathe

I had the same issue but it's solved now:

  1. change

getMessages in chat.service.ts to be like this getMessages():FirebaseListObservable<ChatMessage[]>{ return this.db.list('Messages', { query :{ limitToLast:25, orderByKey:true } }); } 2. in chat.service.ts and app.module.ts you have to change import {AngularFireDatabaseModule} from 'angularfire2/database'; //to be like thisimport {AngularFireDatabaseModule} from 'angularfire2/database-deprecated';

toufikImk avatar Jul 23 '18 04:07 toufikImk

Hi @anonnoisy, @anthony-coplo, @JBuckGuy, @sameeranihathe Look at this https://github.com/wesdoyle/base-chat/issues/10#issuecomment-459274318

Lertis avatar Jan 31 '19 09:01 Lertis

AngularFire has moved, we're now @angular/fire you have to use '@angular/fire/database-deprecated' in place of 'angularfire2/database-deprecated' or 'angularfire2/database' This worked for me.

seigne-m avatar May 20 '19 09:05 seigne-m