AngularJS will not display the "tracking" entry in my data structure. It shows tracking as "tracking": [] as an empty array in the HTML template, and when its console.log'd.
My API returns the following data structure:
[{
"_id": "57e96aaa45b09843a53a4dcd",
"phase": 1,
"notes": "asdf",
"treatment": "asdf",
"patientname": "asdf",
"__v": 0,
"tracking": [
{
"modifiedby": "Person",
"action": "Created",
"_id": "57e96aaa45b09843a53a4dce",
"modifiedat": "2016-09-26T18:36:26.281Z"
}
]
}]
In AngularJS I have the following factory:
getwaiting: function(callback){
$http.get('/pre-auth/getwaitingsubmit').then(function success(data){
return callback(data.data)
})
}
In my controller:
WaitingFactory.getwaiting(function(data){
console.log(data);
$scope.waitinglist = data;
});
When I do {{waitinglist}} in my HTML template, it displays the ALL of the data except "tracking". It displays tracking as: "tracking":[], I cant access the data by stepping into it. If i stringify the data and console.log it, I can see that the data is IN tracking as shown in the first code snippet.
What am I doing wrong here?