JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.16/angular-resource.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">
<button ng-click="getMeaning()">Get Data</button>
<div ng-if="posts">
<ul>
<li>AmendmentDate : {{posts.amendment_date}}</li>
<li>Lead Org : {{posts.lead_org}} </li>
<li>
<table>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr ng-repeat="arm in posts.arms">
<td>{{arm.arm_name}}</td>
<td>{{arm.arm_description}}</td>
</tr>
</table>
</li>
</ul>
</div>
</div>
CSS
ul {
list-style: none;
}
table,
th,
tr,
td {
border: 1px solid black;
border-collapse: collapse;
}
JavaScript
//angular.js example for factory vs service
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope, $http) {
$scope.getMeaning = function() {
$http.get('https://clinicaltrialsapi.cancer.gov/clinical-trial/NCT02141451').
success(function(data, status, headers, config) {
$scope.posts = data;
console.log("$scope.posts :", $scope.posts);
}).
error(function(data, status, headers, config) {
// log error
});
};
});