angularFire の例では、firebase からオブジェクトのコレクションを取得する方法を示しています。
app.controller('ctrl', ['$scope', '$timeout', 'angularFireCollection',
function($scope, $timeout, angularFireCollection) {
var url = 'https://ex.firebaseio.com/stuff';
$scope.col = angularFireCollection(url);
}
]);
単一のオブジェクトのみはどうですか?
私はこのようなことを試しました:
fb.child('stuff/'+id).on('value', function(snapshot) {
$scope.obj = snapshot.val();
console.log('hey got the value')
console.log(snapshot.val())
});
うまくいかないようです。コンソールはオブジェクト値を正しく出力しますが、コントローラーは更新されません。