Hi in my controller I have following code that fetches data from db. It is fetching data correctly there is no problem as I can see it in firebug.
$scope.up = supRepository.getPrice.query({ id: sup._id }, function(data) {
$scope.up = data;
});
alert($scope.up.description);
Problem is that on alert it just gives me empty box nothing in it. No error or value. I believe this might be related to timing? Please let me know how can i fix it. So if it is timing issue it waits until the values are available. Thanks