<code><!DOCTYPE html>
<html lang=
"en"
ng-app=
"myapp"
>
<head>
<meta charset=
"UTF-8"
>
<title>Angular Repeat-Done Demo</title>
<script src=
"https://cdn.bootcss.com/angular.js/1.6.3/angular.min.js"
></script>
</head>
<body ng-app=
"myapp"
>
<p ng-controller=
"AppCtrl"
>
<h4>Users List</h4>
<ul>
<li ng-repeat=
"member in members"
>
<p>
ID:<span>{{member.id}}</span>
Name: <span>{{member.login}}</span>
</p>
</li>
</ul>
</p>
<script type=
"text/javascript"
>
var
myapp = angular.module(
"myapp"
, [])
.controller(
"AppCtrl"
, [
'$scope'
,
function
(
$scope
) {
$scope
.getMembers =
function
() {
let MEMBERS_URL = `https:
let xhr =
new
XMLHttpRequest();
xhr.open(
"GET"
, MEMBERS_URL);
xhr.onreadystatechange = () => {
if
(xhr.readyState == 4 && xhr.status == 200) {
if
(xhr.responseText) {
try
{
$scope
.
$apply
(
function
() {
$scope
.members = JSON.parse(xhr.responseText);
});
}
catch
(error) {
throw
error;
}
}
}
};
xhr.send(null);
};
$scope
.getMembers();
}])
</script>
</body>
</html></code>