I have a function in my application that returns the first name of a user as a Firebase object:
function getFirstName(uid) {
var userNameRef = Ref.child('users/' + uid + '/firstName');;
return $firebaseObject(userNameRef);
}
Why can I only access $value
from the HTML view, but not from a controller like this:
var firstName = getFirstName(uid);
$scope.firstName = firstName.$value;