0
나는 firebase 3에서 데이터를 얻으려고 시도하고 있었고 내가 만든 오류를 알고 있는지 궁금해하고있었습니다.firebase에서 데이터 가져 오기 3
서비스 :
.service("searchService", function($firebaseArray, fb) {
var database = firebase.database();
var bookId = firebase.auth().currentUser;
this.getPostedBooks = function() {
return database.ref("postedBooks/" + bookId).once("value");
}
컨트롤러 :
$scope.getPostedBooks = function() {
searchService.getPostedBooks().then(function(response) {
$timeout(function() {
console.log(response.val())
}, 5000);
})
내가 데이터가 늦게오고 있는지 확인하기 위해 타임 아웃을 사용하려고하지만, 무슨 일이 있어도, 난 그냥 널 얻을.