Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

query error #7

Open
anonnoisy opened this issue Jan 29, 2018 · 6 comments
Open

query error #7

anonnoisy opened this issue Jan 29, 2018 · 6 comments

Comments

@anonnoisy
Copy link

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

@anthony-coplo
Copy link

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

@JBuckGuy
Copy link

JBuckGuy commented Mar 8, 2018

same :/

@sameeranihathe
Copy link

Same here, please help

@toufikImk
Copy link

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';

@Lertis
Copy link

Lertis commented Jan 31, 2019

@seigne-m
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants