i'm trying to list the elements of a MySQL database using AngularJS. Despite some research, i can't find what to write in the controller function to do that.
To be more precise, i previously did it without AngularJS using the following :
$link = new PDO('mysql:host=localhost;dbname=mygaloo;charset=utf8', 'root', '');
$query = $link->query("SELECT * FROM ".$choice." WHERE nom LIKE '%".$request."%' ORDER BY id DESC");
Here's my current code :
<div ng-app="searchApp" ng-controller="searchController">
<table>
<tr ng-repeat="x in objects">
<td>{{ x.name }}</td>
</tr>
</table>
</div>
<script>
var app = angular.module('searchApp', []);
app.controller('searchController', function($scope)
{
//What should i do here ?
});
</script>