FIREBASE警告:使用未指定的索引。考虑在/ accounts中添加“.indexOn”:“mobile”到您的安全规则以获得更好的性能

时间:2016-09-21 13:52:54

标签: angularjs ionic-framework firebase firebase-realtime-database

从Firebase获取数据时我遇到了这个问题:

FIREBASE WARNING: Using an unspecified index. Consider adding ".indexOn": "mobile" at /accounts to your security rules for better performance 
 var ref = new Firebase("https://lxxxxxxx-c7797.firebaseio.com/accounts");
                    ref.orderByChild("mobile").equalTo($scope.mobile).on("child_added", function (snapshot) {
                        //console.log(snapshot.key());
                        $scope.nodeId = snapshot.key();
                        $scope.name = snapshot.val().name;
                        $scope.mobile = snapshot.val().mobile;

                    });

0 个答案:

没有答案