Scenario is,

Im making an angular app. which fetches data from firebase cloud and shows 
it on Html page.Data is being shown on page but when I debug my controller, 
it shows empty list of articles but there is data available thats why data 
is being shown on html page. But why it shows my variable empty during 
debugging?

Here is code of my controller file and html code file is attached


on html page articles1 is providing data,but in controller it shows empty 
after fetching data. i want to access data there so sthat I can prepare 
data for my pie chart.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
   appMainModule.controller('GetCtrl', ['$scope', '$firebaseArray', function 
($scope, $firebaseArray) {
        var firebaseObj = new Firebase("URL")
            debugger;
            //var sync = $firebaseArray(firebaseObj);
         //$scope.articles = sync.$asArray();
            $scope.articles = $firebaseArray(firebaseObj);

            var firebaseObj1 = new Firebase("URL");
            
$scope.articles1=$firebaseArray(firebaseObj1.orderByChild("Month").equalTo("Apr-2016"));
var query=$scope.articles1
var num = query.length;
    }]);
   <table class="table">
                                <thead>
                                    <tr>
                                        <th>Incident Name</th>
                                        <th>Category</th>
                                        <th>Month</th>
                                        <th>Total</th>
                                    </tr>
                                </thead>
                                <tbody ng-repeat="article in articles1 ">

                                    <tr>
                                        <td><p>{{article.IncidentName}}</p></td>
                                        
<td><p>{{article.CategoryParent}}</p></td>
                                        <td><p>{{article.Month}}</p> </td>
                                        <td><p>{{article.Total}}</p> </td>

                                    </tr>

                                </tbody>

                        </div>  

Reply via email to