/
ang3.html
35 lines (27 loc) · 1021 Bytes
/
ang3.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<html ng-app="app">
<head>
<title>Getting Started with Angular</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-rc.2/angular.min.js"></script>
<script src="script3.js"></script>
</head>
<body>
<h1>Starting Angular</h1>
<h3>Documenting all the uses of <a href="http://modernweb.com/2014/09/15/angularjs-one-step-time/">this</a> tutorial so I can start learning Angular.</h3>
<h1>Third Step</h1>
<div ng-controller="MainController">
<h2>Github user API lookup</h2>
<div>{{error}}</div>
<form name="searchUser" ng-submit="search(username)">
<input type="search" required placeholder="Username" ng-model="username"/>
<input type="submit" value="Search"/>
</form>
<div>
<div><img src="{{user.avatar_url}}"></div>
<div ng-show="user.name">{{user.name}}</div>
<div ng-show="user.html_url"><a ng-href="{{user.html_url}}">User Profile</a></div>
<div ng-show="user.public_repos">Public Repos: {{user.public_repos}}</div>
</div>
</div>
</body>
</html>