Argument of type \'{ query: { limitTolast: number; orderByKey: boolean; }; }\' is not assignable to parameter of type \'QueryFn\'.Object literal may only specify known propertie
This will work perfectly. Tried by me
getMessages(): Observable {
return this.db.list('/messages', ref =>
let q = ref.limitTolast(25).orderByKey(true);
return q;
);
}
for more information related to queries goto this link: https://github.com/angular/angularfire2/blob/master/docs/rtdb/querying-lists.md