【发布时间】:2017-12-14 02:00:56
【问题描述】:
我有一个 firebase 列表,我试图按“时间”节点对其进行排序。我怎样才能在打字稿中做到这一点?谢谢!
page.ts:
// Get Chat Reference
chatsProvider.getChatRef(this.company, this.uid, this.interlocutor)
.then((chatRef:any) => {
this.chats = this.db.list(chatRef);
});
ChatProvider.ts
// get list of Chats of a Logged In User
getChats() {
return this.up.getCompany().then(company => {
return this.up.getUid().then(uid => {
let chats = this.db.list(`/companies/${company}/users/${uid}/chats`);
return chats;
});
});
}
【问题讨论】:
-
您要订购哪些代码 // 获取聊天参考或 // 获取登录用户的聊天列表
-
好像你在使用 angularfire2
标签: typescript firebase ionic-framework