@@ -16,47 +16,46 @@ to retrieve Buzz activity and comments.
16
16
<doc:source>
17
17
<script>
18
18
BuzzController.$inject = ['$resource'];
19
- function BuzzController($resource){
19
+ function BuzzController($resource) {
20
20
this.Activity = $resource(
21
21
'https://www.googleapis.com/buzz/v1/activities/:userId/:visibility/:activityId/:comments',
22
- {alt:'json', callback:'JSON_CALLBACK'},
23
- { get: {method:'JSON', params:{visibility:'@self'}},
24
- replies: {method:'JSON', params:{visibility:'@self', comments:'@comments'}}
22
+ {alt: 'json', callback: 'JSON_CALLBACK'},
23
+ { get: {method: 'JSON', params: {visibility: '@self'}},
24
+ replies: {method: 'JSON', params: {visibility: '@self', comments: '@comments'}}
25
25
});
26
26
}
27
27
BuzzController.prototype = {
28
- fetch: function(){
28
+ fetch: function() {
29
29
this.activities = this.Activity.get({userId:this.userId});
30
30
},
31
31
expandReplies: function(activity) {
32
- activity.replies =
33
- this.Activity.replies({userId:this.userId, activityId:activity.id});
32
+ activity.replies = this.Activity.replies({userId: this.userId, activityId: activity.id});
34
33
}
35
34
};
36
35
</script>
37
36
<div ng:controller="BuzzController">
38
- <input name="userId" value="googlebuzz "/>
37
+ <input name="userId" value="misko.hevery "/>
39
38
<button ng:click="fetch()">fetch</button>
40
39
<hr/>
41
40
<div class="buzz" ng:repeat="item in activities.data.items">
42
41
<h1 style="font-size: 15px;">
43
- <img src="{{item.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>
44
- <a href="{{item.actor.profileUrl}}">{{item.actor.name}}</a>
45
- <a href="" ng:click="expandReplies(item)" style="float: right;">
42
+ <img ng: src="{{item.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>
43
+ <a ng: href="{{item.actor.profileUrl}}">{{item.actor.name}}</a>
44
+ <a href ng:click="expandReplies(item)" style="float: right;">
46
45
Expand replies: {{item.links.replies[0].count}}
47
46
</a>
48
47
</h1>
49
48
{{item.object.content | html}}
50
49
<div class="reply" ng:repeat="reply in item.replies.data.items" style="margin-left: 20px;">
51
- <img src="{{reply.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>
52
- <a href="{{reply.actor.profileUrl}}">{{reply.actor.name}}</a>:
50
+ <img ng: src="{{reply.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>
51
+ <a ng: href="{{reply.actor.profileUrl}}">{{reply.actor.name}}</a>:
53
52
{{reply.content | html}}
54
53
</div>
55
54
</div>
56
55
</div>
57
56
</doc:source>
58
57
<doc:scenario>
59
- it('fetch buzz and expand', function(){
58
+ it('fetch buzz and expand', function() {
60
59
element(':button:contains(fetch)').click();
61
60
expect(repeater('div.buzz').count()).toBeGreaterThan(0);
62
61
element('.buzz a:contains(Expand replies):first').click();
0 commit comments