Using the browser, both firefox and chrome, I am able to see my repeated items. However once the app is pushed to the device (android in this case) no results show. I am sure it is iterating through the total results, because I get a blank screen with 51 blank spots. If I don't use the track by $index I get the duplicate error.
I attempted the json.parse(); found here ng-repeater not working for JSON with no results either.
My controller looks like so:
app.controller('DataCtrl', function($scope, $ionicModal, $timeout, $http) {
$http.get('/js/center-forecast.json').
success(function(data, status, headers, config) {
$scope.jsondatas = data.rows;
}).
error(function(data, status, headers, config) {
$scope.jsondatas = "Error. The Report is Not Available at this Time.";
});
});
Loop:
<ion-list>
<ion-item ng-repeat="jsondata in jsondatas track by $index">
{{jsondata.row.name}}
</ion-item>
</ion-list>
EDIT: Just tried {{$index.jsondata.row.name}} and got the same results as the device in the browser. 51 rows with no data.
.json data validates just fine. It is repeating through on the device, but not showing the results in each , just showing a blank . I did check the css to make sure the words are not white. I don't see any results/errors in log.cat either...
Any ideas?
edit: JSON data example:
"rows": [{
"row": {
"id": "AAIC",
"name": "Alaska Avalanche",
"url": "http://www.valdezavalanchecenter.org",
"center_point": "(-146.3053,61.1231)",
"lat": "61.1231",
"lng": "-146.3053",
"icon": "center_i.gif"
}
}, {
"row": {
"id": "PAC",
"name": "Payette",
"url": "http://www.payetteavalanche.org/advisory/",
"center_point": "(-116.095276,44.906469)",
"lat": "44.906469",
"lng": "-116.095276",
"icon": "center.png"
}
}, {
"row": {
"id": "KPAC",
"name": "Flagstaff/Kachina Peaks",
"url": "http://www.kachinapeaks.org/",
"center_point": "(-111.6506,35.1981)",
"lat": "35.1981",
"lng": "-111.6506",
"icon": "center_i.gif"
}
}]