I have an angular application that is receiving data from firebase but I don't know how to display the data in the view. The data retrieved from firebase is an Object having 3 Objects with these names: KoAJWEHt6E2krjLgSuB,KoAJWEPc0seRt95JqoH,KoAJWEQDiAsOWwvL2QZ (these names are the unique keys assigned by firebase). These 3 objects hold data for classifieds of each person. Now I don't know how to display this data in the view.I have already tried ng-repeat but it doesn't show anything and there is no error in the console.
Controller:
myApp.controller("classifiedsCtrl",["$scope","$http","$mdSidenav","$mdToast","$mdDialog","$firebaseArray",function($scope,$http,$mdSidenav,$mdToast,$mdDialog,$firebaseArray){
var ref=firebase.database().ref().child('persons');
ref.on('value',function(snapshot){
$scope.classifieds=snapshot.val();
console.log($scope.classifieds);
});
}]);
Controller View:
<md-card flex="30" ng-repeat="classified in classifieds | filter:classifiedsFilter" class="record">
<md-card-content>
<div class="classified-info" ng-show="!showContact">
<h2 class="md-title">{{classified.title | uppercase}}</h2>
<h3>{{classified.price | currency}}</h3>
<p>{{classified.description}}</p>
</div>
<div class="classified-contact" ng-show="showContact">
<p>
<md-icon class="mdi mdi-account"></md-icon>{{classified.name}}</p>
<p>
<md-icon class="mdi mdi-phone"></md-icon>{{classified.phone}}</p>
</div>
<div layout="row">
<md-button ng-click="showContact=true" ng-show="!showContact">Contact</md-button>
<md-button ng-click="showContact=false" ng-show="showContact">Details</md-button>
<md-button ng-click="showAdmin=true" ng-show="!showAdmin">Admin</md-button>
<md-button ng-click="showAdmin=false" ng-show="showAdmin">Close</md-button>
</div>
<div class="classified-admin" ng-if="showAdmin">
<h3>Admin</h3>
<div layout="row">
<md-button class="md-raised md-primary">Edit</md-button>
<md-button ng-click="deleteClassified($event,classified)" class="md-raised md-warn">Delete</md-button>
</div>
</div>
</md-card-content>
</md-card>