From 849a05b5a578f19ddc3d24dc9fbd304e0e07612a Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 22 Jul 2010 11:18:32 -0700 Subject: added jsonp to resources --- example/buzz/buzz.css | 0 example/buzz/buzz.html | 30 ++++++++++++++++++++++++++++++ example/buzz/buzz.js | 19 +++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 example/buzz/buzz.css create mode 100644 example/buzz/buzz.html create mode 100644 example/buzz/buzz.js (limited to 'example/buzz') diff --git a/example/buzz/buzz.css b/example/buzz/buzz.css new file mode 100644 index 00000000..e69de29b diff --git a/example/buzz/buzz.html b/example/buzz/buzz.html new file mode 100644 index 00000000..ee2b2bb9 --- /dev/null +++ b/example/buzz/buzz.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+ + +
+ + + diff --git a/example/buzz/buzz.js b/example/buzz/buzz.js new file mode 100644 index 00000000..871982d7 --- /dev/null +++ b/example/buzz/buzz.js @@ -0,0 +1,19 @@ +angular.service('myApplication', function($resource){ + this.Activity = $resource( + 'https://www.googleapis.com/buzz/v1/activities/:userId/:visibility/:activityId/:comments', + {alt:'json', callback:'JSON_CALLBACK'}, + { + get: {method:'JSON', params:{visibility:'@self'}}, + replies: {method:'JSON', params:{visibility:'@self', comments:'@comments'}} + }); +}, {inject:['$resource']}); + +function BuzzController(){ + this.$watch('$location.hashPath', this.userChange); +} +BuzzController.prototype = { + userChange: function(){ + this.userId = this.$location.hashPath; + this.activities = this.Activity.get({userId:this.userId}); + } +}; -- cgit v1.2.3 From 2987f7f705baffad8081fc4a3a95eab79b0d9695 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 22 Jul 2010 15:32:57 -0700 Subject: fix howers which were accidently broken --- example/buzz/buzz.css | 45 +++++++++++++++++++++++++++++++++++++++++++++ example/buzz/buzz.html | 36 ++++++++++++++++++++++-------------- example/buzz/buzz.js | 27 +++++++++++++++++++++++++++ 3 files changed, 94 insertions(+), 14 deletions(-) (limited to 'example/buzz') diff --git a/example/buzz/buzz.css b/example/buzz/buzz.css index e69de29b..e77c3bac 100644 --- a/example/buzz/buzz.css +++ b/example/buzz/buzz.css @@ -0,0 +1,45 @@ +body { + background: -webkit-gradient(linear, left top, left 400, from(#1C4070), to(#fff)); + background-repeat: no-repeat; + margin: 0px; +} + +.bar { + border-top: 1px solid white; + border-bottom: 1px solid black; + text-align: right; + background: -webkit-gradient(linear, left top, left bottom, from(#CCC), to(#888)); + -webkit-background-origin: padding; -webkit-background-clip: content; +} +.bar button { + margin: 5px; +} + +.bar span { + float: left; + font-family: monospace; + font-size: 1.5em; + color: black; +} + +ul.buzz { + list-style: none; + padding: 5px; + margin: 0; +} + +ul.buzz > li { + border: 1px solid yellow; + margin: 5px; + padding: 0; +} + +ul.buzz > li > h1 { + border: 1px solid yellow; + margin: 0; +} + +ul.buzz > li > div { + border: 1px solid yellow; + margin: 0; +} diff --git a/example/buzz/buzz.html b/example/buzz/buzz.html index ee2b2bb9..f1916f54 100644 --- a/example/buzz/buzz.html +++ b/example/buzz/buzz.html @@ -2,28 +2,36 @@ + - +
- + <angular/> Buzz +
-