것은 내가 할 노력하고 무엇 :
가 내 홈 페이지에 출력이 책 노드에있는 모든 책을 원한다. 필요한 것은 북 노드의 모든 책을 포함하는 배열로 AngularJs에서 ng-repeat 지시문을 사용하여 반복 할 수 있습니다. 아래 코드에서, 데이터를 로그 할 때 ng-repeat와 함께 사용할 수없는 객체 객체를 얻습니다. 또 다른 문제점은 $ scope.allBooks 변수를 페이지에 출력하려고 시도 할 때 아무것도 나타나지 않는 것입니다. 아무도 이것으로 나를 도울 수 있습니까? 당신이 angularfire 당신은 업데이트를 실행하는 각 노하우를하도록해야합니다 사용하지 않으려는 경우 https://firebase.google.com/docs/
// Main Controller
firebase.database().ref('books').on('value', function(snapshot) {
var data = snapshot.val();
$scope.allBooks = data;
console.log(data);
});
// Book Node in Firebase
books : {
id : {
title: 'The Hunger Games',
author: 'Suzanne'
},
id : {
title: 'Harry Potter and the Order of the Phoenix',
author: 'J.K.'
}
}
감사합니다. Mathew! –