My Data looks like this:
[ { "TravelerExtended": { "ExtendedInt_1": { "#text": "0", "Label": "Do you require the hotel has a spa or fitness center?:" }, "ExtendedInt_2": { "#text": "0", "Label": "Do you prefer to be prechecked into your room?:" }, "ExtendedInt_3": { "#text": "0", "Label": "Connecting/Adjoining rooms, when traveling with family?:" },
Then, my $scope is this:
define(function () { return function ($scope, $ticket, $person, $http, $el, $app) { // TODO$scope.is_loading = true; var params = { url: "http://10.100.1.98:81/myidapi.php", // Any other parameters will be sent as-is // to your remote web service. // For example, here we are sending an 'email' parameter: id: $ticket.id }; $http.get('DP_URL/agent/misc/proxy', {params: params}).success(function(data) { $scope.is_loading = false; $scope.profiles = data; }); };
});
Then, of course, I have the HTML output trying to use the various NG functions:
<div ng-repeat=“traveler in profiles”>
Extended Profile
<div ng-repeat=“profile in traveler.TravelerExtended”><li ng-repeat-"field in profile.ExtendedInt_1">{{field.label}} {{field.#text}}</li> </div>
</div>
I can’t seem to figure out how to get to the third level of data. It seems that that perhaps the initial data load is malformed, or that I just am bungling up the ng-repeat functions.
#angular #angular.js