diff options
Diffstat (limited to 'example/buzz/buzz.html')
| -rw-r--r-- | example/buzz/buzz.html | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/example/buzz/buzz.html b/example/buzz/buzz.html index f1916f54..a6777ff8 100644 --- a/example/buzz/buzz.html +++ b/example/buzz/buzz.html @@ -2,32 +2,44 @@ <html xmlns:ng="http://angularjs.org"> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script> - <!--script type="text/javascript" src="http://angularjs.org/ng/js/angular-debug.js#autobind"></script--> - <script type="text/javascript" src="../../src/angular-bootstrap.js#autobind"></script> + <script type="text/javascript" src="http://angularjs.org/ng/js/angular-debug.js#autobind"></script> <script type="text/javascript" src="buzz.js"></script> + <link rel="stylesheet" type="text/css" href="http://angularjs.org/ng/css/angular.css"/> <link rel="stylesheet" type="text/css" href="buzz.css"/> </head> <body ng:init="$window.$root = this" ng:controller="BuzzController"> - <div class="bar"> + <div> <span><angular/> Buzz</span> - <input type="text" name="userId" ng:required/> - <button ng:click="$location.hashPath = userId">fetch</button> + <span> + filter: + <input type="text" name="filterText"/> + </span> + <span> + user: + <input type="text" name="userId" ng:required/> + <button ng:click="$location.hashPath = userId">fetch</button> + </span> </div> - <ul class="buzz"> - <li ng:repeat="item in activities.data.items"> + <ul> + <li ng:repeat="item in activities.data.items.$filter(filterText)"> <h1> <img src="{{item.actor.thumbnailUrl}}"/> <a href="{{item.actor.profileUrl}}">{{item.actor.name}}</a> + <a href="#" ng:click="expandReplies(item)">Replies: {{item.links.replies[0].count}}</a> </h1> <div> {{item.object.content | html}} - <a href="#" ng:click="expandReplies(item)">Replies: {{item.links.replies[0].count}}</a> + <div> + <a href="{{attachment.links.enclosure[0].href}}" ng:repeat="attachment in item.object.attachments"> + <img src="{{attachment.links.preview[0].href}}"/> + </a> + </div> </div> <my:expand expand="item.replies.show"> <ul> <li ng:repeat="reply in item.replies.data.items"> <img src="{{reply.actor.thumbnailUrl}}"/> - <a href="{{reply.actor.profileUrl}}">{{reply.actor.name}}</a> + <a href="{{reply.actor.profileUrl}}">{{reply.actor.name}}</a>: {{reply.content | html}} </li> </ul> |
