我需要从数据库中检索特定的消息
import {AngularFireDatabase} from 'angulrfire2/database';
export class homepage {
constructor (private db:AngularFireDatabase){}
getListMessages(myId, userToChatId,startAtNumber){
return this.db.list(`users-messages/${myId}/${userToChatId}/messages`, (ref) =>
ref.limitToLast(5).startAt(5).endAt(10)
).valueChanges().subscribe(res => console.log(res);
}
}
这不会给我任何数据
消息数据库结构 messages