From 0d4def68ae0d95dd106d2731d60b6d6b635b5afc Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Wed, 2 Feb 2011 17:46:01 -0800 Subject: added more cookbook: work in progress --- docs/cookbook.buzz.ngdoc | 61 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) (limited to 'docs/cookbook.buzz.ngdoc') diff --git a/docs/cookbook.buzz.ngdoc b/docs/cookbook.buzz.ngdoc index 0e89cd20..2e82b2d1 100644 --- a/docs/cookbook.buzz.ngdoc +++ b/docs/cookbook.buzz.ngdoc @@ -1,4 +1,63 @@ @workInProgress @ngdoc overview -@name Cookbook: Resources - Buzz Demo +@name Cookbook: Resources - Buzz @description + +External resources are URLs that provide JSON data, which are then rendered with the help of +templates. angular has a resource factory that can be used to give names to the URLs and then +attach behavior to them. For example you can use the +{@link http://code.google.com/apis/buzz/v1/getting_started.html#background-operations| Google Buzz API} +to retrieve Buzz activity and comments. + + + + +
+ + +
+
+

+ + {{item.actor.name}} + + Expand replies: {{item.links.replies[0].count}} + +

+ {{item.object.content | html}} +
+ + {{reply.actor.name}}: + {{reply.content | html}} +
+
+
+
+ + it('fetch buzz and expand', function(){ + element(':button:contains(fetch)').click(); + expect(repeater('div.buzz').count()).toBeGreaterThan(0); + element('.buzz a:contains(Expand replies):first').click(); + expect(repeater('div.reply').count()).toBeGreaterThan(0); + }); + +
-- cgit v1.2.3