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')
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