Rob*_*ell 3 angularjs firebase angularfire
这是我现在的代码:
var url = 'https://*****.firebaseio.com/photos';
var promise = angularFire(url, $scope, 'photos', {});
promise.then(function() {
//limit here.
});
Run Code Online (Sandbox Code Playgroud)
我可以插入什么代码来限制从firebase返回的内容到只有具有指定优先级的内容(假设优先级为"new")?
谢谢您的帮助.
只需将已经有限的查询传递给angularFire,就像这样:
var ref = new Firebase("https://*****.firebaseio.com/photos");
var promise = angularFire(ref.startAt("new"), $scope, "photos", {});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1122 次 |
| 最近记录: |