My AngularJS application is not displaying the "tracking" entry from the data structure as expected. It appears as an empty array both in the HTML template and when logged to the console.
The API returns the following data:
[{
"_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 my AngularJS factory, I have the following function:
getwaiting: function(callback){
$http.get('/pre-auth/getwaitingsubmit').then(function success(data){
return callback(data.data)
})
}
And in my controller:
WaitingFactory.getwaiting(function(data){
console.log(data);
$scope.waitinglist = data;
});
When I try to display {{waitinglist}} in my HTML template, it shows all the data except for the "tracking" field, which appears as an empty array. I cannot access the data within "tracking". However, when I stringify the data and log it to the console, I can see that the data is indeed present in the "tracking" field.
What could be causing this issue?