<script>
var app = angular.module('myApp', []);
app.controller('usersCtrl', function($scope, $http) {
$http.get("https://freewebmentor.com/api/users_mysql.php")
.then(function (response) {$scope.names = response.data.records;});
});
</script>
//UserCtrl is used to display all the user data on your web page.
div ng-app="myApp" ng-controller="usersCtrl">
<table>
<tr ng-repeat="result in names">
<td>{{ result.username }}</td>
<td>{{ result.email }}</td>
</tr>
</table>
</div>
Top comments (0)