I am successfully retrieving data from my Database using AngularJS, however, I am struggling to find a way to extract the data from ng-repeat and store it in a JavaScript Object.
Is the data treated as an expression after ng-repeat is applied? I have heard about a parser option but I am unsure of how it functions or if it is relevant to my issue.
<div ng-app="myApp" ng-controller="customersCtrl">
<table>
<tr ng-repeat="x in records">
<td>{{ x.Timestamp }}</td>
<td>{{ x.PT1 }}</td>
</tr>
</table>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('customersCtrl', function($scope, $http) {
$http.get("http://localhost/tests/dataconn.php")
.then(function (response) {$scope.records = response.data.records;});
});
</script>
I am looking for a solution to pass x.Timestamp and x.PT# to JavaScript. :)
Best regards,
Max
Edit: APOLOGIES, forgot to include my code!