If I read the question correctly, you might get the impression that $ bind () is converting a $ firebase object to an array or an object with raw data. Essentially, the only difference between an instance of $ firebase and $ bind is that local data changes are automatically returned to Firebase from Angular. If you use $ firebase without $ bind, you need to call $ save for local changes.
Keeping in mind that $ firebase is a Firebase API wrapper and not a simple data array, you can treat it as raw data in most cases.
To iterate data in a Firebase object, you can use ngRepeat:
<li ng-repeat="(key, item) in $sessions">{{item|json}}</li>
Or if you want to apply filters that depend on arrays:
<li ng-repeat="(key, item) in $sessions | orderByPriority | filter:searchText">
Or in the controller using $ getIndex:
angular.forEach($scope.sessions.$getIndex(), function(key) { console.log(key, $scope.sessions[key]); });
The methods used $ add / $ update / etc are part of the $ API of the firebase object . The documentation and tutorial should be excellent primers for understanding this process.
It is also part of an API that continues to evolve to better fit Angular's way of doing things and getting feedback from users.
Kato
source share