|
2 | 2 | <html xmlns:ng="http://angularjs.org"> |
3 | 3 | <head> |
4 | 4 | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script> |
| 5 | + <!--script type="text/javascript" src="http://angularjs.org/ng/js/angular-debug.js#autobind"></script--> |
5 | 6 | <script type="text/javascript" src="../../src/angular-bootstrap.js#autobind"></script> |
6 | 7 | <script type="text/javascript" src="buzz.js"></script> |
7 | | - <link rel="stylesheet" type="text/css" href="style.css"/> |
| 8 | + <link rel="stylesheet" type="text/css" href="buzz.css"/> |
8 | 9 | </head> |
9 | 10 | <body ng:init="$window.$root = this" ng:controller="BuzzController"> |
10 | 11 | <div class="bar"> |
11 | | - <input type="text" name="userId"/> |
| 12 | + <span><angular/> Buzz</span> |
| 13 | + <input type="text" name="userId" ng:required/> |
12 | 14 | <button ng:click="$location.hashPath = userId">fetch</button> |
13 | 15 | </div> |
14 | | - <ul> |
| 16 | + <ul class="buzz"> |
15 | 17 | <li ng:repeat="item in activities.data.items"> |
16 | | - <img src="{{item.actor.thumbnailUrl}}"/> |
17 | | - <a href="{{item.actor.profileUrl}}">{{item.actor.name}}</a> |
18 | | - {{item.object.content | html}} |
19 | | - <a href="">Replies: {{item.links.replies[0].count}}</a> |
20 | | - <ul> |
21 | | - <li ng:repeat="reply in item.replies.items"> |
22 | | - <img src="{{reply.actor.thumbnailUrl}}"/> |
23 | | - <a href="{{reply.actor.profileUrl}}">{{reply.actor.name}}</a> |
24 | | - {{reply.content | html}} |
25 | | - </li> |
26 | | - </ul> |
| 18 | + <h1> |
| 19 | + <img src="{{item.actor.thumbnailUrl}}"/> |
| 20 | + <a href="{{item.actor.profileUrl}}">{{item.actor.name}}</a> |
| 21 | + </h1> |
| 22 | + <div> |
| 23 | + {{item.object.content | html}} |
| 24 | + <a href="#" ng:click="expandReplies(item)">Replies: {{item.links.replies[0].count}}</a> |
| 25 | + </div> |
| 26 | + <my:expand expand="item.replies.show"> |
| 27 | + <ul> |
| 28 | + <li ng:repeat="reply in item.replies.data.items"> |
| 29 | + <img src="{{reply.actor.thumbnailUrl}}"/> |
| 30 | + <a href="{{reply.actor.profileUrl}}">{{reply.actor.name}}</a> |
| 31 | + {{reply.content | html}} |
| 32 | + </li> |
| 33 | + </ul> |
| 34 | + </my:expand> |
27 | 35 | </li> |
28 | 36 | </ul> |
29 | 37 | </body> |
|
0 commit comments