Hi David,
Well, I have no idea what those url’s return. That makes it hard to give a
complete solution to your problem.
<div ng-repeat="room in rooms">
<h1>
{{ room.room }}
<span class="floor pull-right">{{ room.floor }}</span>
</h1>
<div ng-repeat="api_endpoint in room.api_endpoints" ng-init='data=
{url:api_endpoint}'>
<h2>
{{resolve(data) ; data.data|json}}
</h2>
</div>
</div>
in your controller you can do this:
$scope.resolve = function(data) {
$http.get(data.url).success(function (incoming) {
data.data = incoming;
});
};
It is good to note you should move the to an service, if it becomes any
more complex than this.
If you have control over the back-end/server that is giving you the data,
you might consider
it to generate html partials, that you can simply include using ng-include.
Regards
Sander
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.