how can I put this Rest Json Response:
[
{
"Attribute1": 1,
"Attribute2": "1",
"Attribute3": "example",
"Attribute4": "12345",
"Attribute5": "example example",
"Attribute6: "20/10/2015",
"Attribute7": "2015-11-13"
},
{
"Attribute1": 7,
"Attribute2": "5",
"Attribute3": "example",
"Attribute4": "12345",
"Attribute5": "example example",
"Attribute6: "20/10/2015",
"Attribute7": "2015-11-13"
},
{
"Attribute1": 2,
"Attribute2": "3",
"Attribute3": "example",
"Attribute4": "12345",
"Attribute5": "example example",
"Attribute6: "20/10/2015",
"Attribute7": "2015-11-13"
}
]
which i get by calling a http.get in this function in angularjscustom.js:
$scope.getCalls = function() {
$scope.ObjectList = [$http.get("http://localhost:8080/test/test2/test4?uname=" + scope.uname + "&passwort=" +scope.password)];
to a table in this index.html file :
<table class="table table-hover table-striped">
<thead>
<tr>
<th> Attribut1 </th>
<th> Attribut2 </th>
<th> Attribut3 </th>
<th> Attribut4 </th>
<th> Attribut5 </th>
<th> Attribut6 </th>
</tr>
</thead>
<tbody>
<tr data-ng-repeat="Object in ObjectList">
<td>{{ Object.Attribut1}}</td>
<td>{{ Object.Attribut2 }}</td>
<td>{{ Object.Attribut3 }}</td>
<td>{{ Object.Attribut4 }}</td>
<td>{{ Object.Attribut5 }}</td>
<td>{{ Object.Attribut6 }}</td>
<td>{{ Object.Attribut7 }}</td>
</tr>
</tbody>
</table>
Also i want to make it possible to click on a checkbox to get a reference to Attribut 1 for example.. I cant figure out how to do this. Maybe someone can direct me in the right way? I have no AngularJs or Javascript experience.