As a newcomer to the latest Firebase SDK (with some experience using angularfire), I set out to retrieve data and display it using Angular.
This is my progress so far:
var app = angular.module('dApp',[]);
app.controller('listingControler',['$scope', function($scope){
$scope.downloads = [];
var config = {
//removed config
};
firebase.initializeApp(config);
var leadsRef = database.ref('/');
leadsRef.on('value', function(snapshot) {
snapshot.forEach(function(childSnapshot) {
$scope.downloads.push(childSnapshot.val());
});
return $scope.downloads;
});
}]);
View
<body ng-app="dApp">
<div ng-controller="listingControler">
<ul>
<li ng-repeat="d in downloads">{{d.email}}</li>
</ul>
</body>