Created
July 17, 2016 23:08
-
-
Save bolenton/c57b2f786b04e3e266e682c8a9277e4d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html ng-app="ngApp"> | |
<head> | |
<link rel="stylesheet" href="style.css" /> | |
</head> | |
<body ng-controller="MainController"> | |
<h2>{{message}}</h2> | |
<div>{{error}}</div> | |
<div><p class="displayUserName">{{username.toUpperCase()}}</p></div> | |
<form name="searchUser" ng-submit="search(username)"> | |
<input type="search" required placeholder="Username to find" ng-model="username"> | |
<input type="submit" value="search"> | |
</form> | |
<div class="userData" ng-show="user"> | |
<div>Name: {{user.name}}</div> | |
<div>Location: {{user.location}}</div> | |
<div>blog: {{user.blog}}</div> | |
<div>company: {{user.company}}</div><br/> | |
<div><img class="profile-img" ng-src="{{user.avatar_url}}" title="{{user.name}}"></div> | |
Order: | |
<select ng-model="repoSortOrder"> | |
<option value="+name">Name</option> | |
<option value="-stargazers_count">Stars</option> | |
<option value="+language">Language</option> | |
</select> | |
</div> | |
<br> | |
<table ng-hide="!user"> | |
<thead> | |
<tr> | |
<th>Name</th> | |
<th>Head</th> | |
<th>Language</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr ng-repeat="repo in repos | orderBy:repoSortOrder"> | |
<td>{{repo.name}}</td> | |
<td>{{repo.stargazers_count | number}}</td> | |
<td>{{repo.language}}</td> | |
</tr> | |
</tbody> | |
</table> | |
</body> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script> | |
<script src="script.js"></script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment