I am using a ng-repeat element to display a list of elements. Each element has some Parse.Pointer objects which are referencing other objects. In my template, when i want to display a value from a referenced object, the value only gets displayed when i first move to an other tab of my ionic app and then return to the tab where i want to display those values.
This is my call for the list of elements:
function getFragments(limit){
var deferred = $q.defer();
var query = new Parse.Query(Fragment);
query.limit(limit);
query.descending('createdAt');
query.find({
success: function(results){
deferred.resolve(results);
error: function(error){
deferred.reject(error);
}
});
return deferred.promise;
}
this is how i assign the values to the $scope:
Fragment.getFragments(20).then(function(fragments){
$scope.fragments=fragments;
});
and this how i display a value of an object that has a pointer in the object (event is a pointer, name is a variable from the event object):
<ion-item ng-repeat="fragment in fragments">
<h3>{{fragment.event.name}}</h3>
Each value of each object in the list also has a get property defined like this:
Fragment.prototype.__defineGetter__('event', function(){
return this.get('event');
});