mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-24 10:20:23 +00:00
87 lines
64 KiB
HTML
87 lines
64 KiB
HTML
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||
|
|
<head>
|
||
|
|
<link rel="stylesheet" type="text/css" href="buzz.css"/>
|
||
|
|
<script type="text/javascript">
|
||
|
|
function time(timerName){
|
||
|
|
var started = new Date().getTime();
|
||
|
|
return {
|
||
|
|
name: timerName,
|
||
|
|
started: started,
|
||
|
|
lapped: started,
|
||
|
|
lastLap: {duration:0, name:'BEGIN', time:started},
|
||
|
|
lap: function(lapName){
|
||
|
|
var totalDuration = (this.lapped = new Date().getTime()) - this.started;
|
||
|
|
var lapDuration = this.lapped - this.lastLap.time;
|
||
|
|
var lastName = this.lastLap.name;
|
||
|
|
this.lastLap = {duration:lapDuration, name:lapName, time:this.lapped};
|
||
|
|
console.log(timerName, lapName + ': ' + this.lastLap.duration + ' ms.', '(' + totalDuration + ' ms.)');
|
||
|
|
}
|
||
|
|
};
|
||
|
|
}
|
||
|
|
window.browser = time('boot:');
|
||
|
|
</script>
|
||
|
|
<script type="text/javascript" src="../angular-minified.js" ng:autobind ng:css="css/angular.css"></script>
|
||
|
|
<script type="text/javascript">
|
||
|
|
window.browser.lap('parse <angular/>');
|
||
|
|
function onInit() {
|
||
|
|
window.browser.lap('compile DOM');
|
||
|
|
window.setTimeout(function(){
|
||
|
|
window.browser.lap('DOM render');
|
||
|
|
}, 1);
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
<script>
|
||
|
|
// 60kb JSON
|
||
|
|
window.googlebuzz = {"data":{"kind":"buzz#activityFeed","links":{"next":[{"href":"https://www.googleapis.com/buzz/v1/activities/111062888259659218284/@self?alt\u003djson&max-results\u003d20&c\u003dCJPT45zJwKECSL72gt20sqMC"}],"self":[{"href":"https://www.googleapis.com/buzz/v1/activities/111062888259659218284/@self?alt\u003djson","type":"application/json"}]},"title":"Google Buzz Self Feed for Google Buzz Team","updated":"2010-08-10T05:08:40.954Z","id":"tag:google.com,2010:buzz-feed:self:posted:111062888259659218284","items":[{"kind":"buzz#activity","title":"AutoShare from YouTube to Buzz If you use YouTube a lot, you may be familiar with AutoShare (see ...","published":"2010-07-01T01:00:37.000Z","updated":"2010-07-01T01:00:38.218Z","id":"tag:google.com,2010:buzz:z132tjxxinrhyz4pz04cdjyb3mjeulcwv3c","links":{"liked":[{"href":"https://www.googleapis.com/buzz/v1/activities/111062888259659218284/@self/B:z132tjxxinrhyz4pz04cdjyb3mjeulcwv3c/@liked?alt\u003djson","type":"application/json","count":91}],"alternate":[{"href":"http://www.google.com/buzz/111062888259659218284/YyNSUbbuV1N","type":"text/html"}],"replies":[{"href":"https://www.googleapis.com/buzz/v1/activities/111062888259659218284/@self/B:z132tjxxinrhyz4pz04cdjyb3mjeulcwv3c/@comments?alt\u003djson","type":"application/json","count":26,"updated":"2010-08-10T05:08:40.954Z"}],"self":[{"href":"https://www.googleapis.com/buzz/v1/activities/111062888259659218284/@self/B:z132tjxxinrhyz4pz04cdjyb3mjeulcwv3c?alt\u003djson","type":"application/json"}]},"actor":{"id":"111062888259659218284","name":"Google Buzz Team","profileUrl":"http://www.google.com/profiles/googlebuzz","thumbnailUrl":"http://www.google.com/s2/photos/public/AIbEiAIAAABECOz6ztaiyNHDmQEiC3ZjYXJkX3Bob3RvKigyYTBkYmNlNDgyOGI0NDViOTRlYTlkZjVmNzIxZTllNjMzMWFhODljMAEgSk99ukLxRAAHhTbzhgNkGnE-8g"},"verbs":["post"],"object":{"type":"note","content":"\u003cb\u003eAutoShare from YouTube to Buzz\u003c/b\u003e\r\u003cbr /\u003e\r\u003cbr /\u003eIf you use YouTube a lot, you may be familiar with AutoShare (see \u003ca href\u003d\"http://help.youtube.com/support/youtube/bin/answer.py?hl\u003den&answer\u003d157215\" \u003ehttp://help.youtube.com/support/youtube/bin/answer.py?hl\u003den&answer\u003d157215\u003c/a\u003e) which you can use to automatically share your favorites, likes, uploads, or comments on videos to Facebook. Twitter, and Google Reader. Now you can choose to automatically share from YouTube to Google Buzz as well.\r\u003cbr /\u003e\r\u003cbr /\u003eYou can still keep YouTube as a connected site in Buzz if you hooked it up previously, but that only automatically posts your uploads for now.","links":{"alternate":[{"href":"http://www.google.com/buzz/111062888259659218284/YyNSUbbuV1N","type":"text/html"}]},"attachments":[{"type":"article","title":"AutoShare : Learn More - YouTube Help","links":{"alternate":[{"href":"http://help.youtube.com/support/youtube/bin/answer.py?hl\u003den&answer\u003d157215","type":"text/html"}]}}]},"source":{"title":"Buzz"},"visibility":{"entries":[{"id":"tag:google.com,2010:buzz-group:@me:@public","title":"Public"}]}},{"kind":"buzz#activity","title":"Google Buzz API talks and hackathons Come join us to talk about how you can build on Google Buzz ...","published":"2010-07-02T02:56:27.000Z","updated":"2010-07-02T02:56:28.031Z","id":"tag:google.com,2010:buzz:z13xe5wwtnyqelxkw22fzlswnuqoebasu","links":{"liked":[{"href":"https://www.googleapis.com/buzz/v1/activities/111062888259659218284/@self/B:z13xe5wwtnyqelxkw22fzlswnuqoebasu/@liked?alt\u003djson","type":"application/json","count":96}],"alternate":[{"href":"http://www.google.com/buzz/111062888259659218284/5qbwA75RRr1","type":"text/html"}],"replies":[{"href":"https://www.googleapis.com/buzz/v1/activities/111062888259659218284/@self/B:z13xe5wwtnyqelxkw22fzlswnuqoebasu/@comments?alt\u003djson","type":"application/json","count":62,"updated":"2010-08-08T10:48:37.665Z"}],"self":[{"href":"https://www.googleapis.com/buzz/v1/activities/111062888259659218284/@self/B:z13xe5wwtnyqelxkw22fzlswnuqoebasu?alt\u003djson","type":"application/jso
|
||
|
|
</script>
|
||
|
|
<script type="text/javascript">
|
||
|
|
window.browser.lap('parse model');
|
||
|
|
</script>
|
||
|
|
</head>
|
||
|
|
<body ng:init="$window.$scope = this;$window.onInit(); activities = $window.googlebuzz" style="display:none;" ng:show="true">
|
||
|
|
<a href="{{$location.href}}">reload</a>
|
||
|
|
<hr/>
|
||
|
|
<div>
|
||
|
|
<span><angular/> Buzz</span>
|
||
|
|
<span>
|
||
|
|
filter:
|
||
|
|
<input type="text" name="filterText"/>
|
||
|
|
</span>
|
||
|
|
<span>
|
||
|
|
user:
|
||
|
|
<input type="text" name="userId" ng:required/>
|
||
|
|
<button>fetch</button>
|
||
|
|
</span>
|
||
|
|
</div>
|
||
|
|
<ul>
|
||
|
|
<li ng:repeat="item in activities.data.items.$filter(filterText)">
|
||
|
|
<h1>
|
||
|
|
<img ng:attr-bind="{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}}
|
||
|
|
<div>
|
||
|
|
<a href="{{attachment.links.enclosure[0].href}}" ng:repeat="attachment in item.object.attachments">
|
||
|
|
<img ng:attr-bind="{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 ng:attr-bind="{src:'{{reply.actor.thumbnailUrl}}'}"/>
|
||
|
|
<a href="{{reply.actor.profileUrl}}">{{reply.actor.name}}</a>:
|
||
|
|
{{reply.content | html}}
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
</my:expand>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
|
||
|
|
<div ng:eval="$window.browser.lap('DOM created')"></div>
|
||
|
|
</body>
|
||
|
|
</html>
|