aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngResource
diff options
context:
space:
mode:
authorJeff Cross2013-11-14 21:13:39 -0800
committerJeff Cross2013-11-14 21:22:11 -0800
commit40e34a924b629280eb572e957cc8a2cf4f88394c (patch)
treee02904200c45bffc42aa92390a11cf9fe4776cf1 /src/ngResource
parent90f87072e83234ae366cfeb3c281503c31dad738 (diff)
downloadangular.js-40e34a924b629280eb572e957cc8a2cf4f88394c.tar.bz2
docs(ngResource): removed buzz client example
The Buzz Client example on the ngResource doc was causing parse errors. While the root cause is being investigated, the example has been removed, and should be replaced by a more relevant example anyhow.
Diffstat (limited to 'src/ngResource')
-rw-r--r--src/ngResource/resource.js52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js
index 82065e09..d11a4d60 100644
--- a/src/ngResource/resource.js
+++ b/src/ngResource/resource.js
@@ -253,58 +253,6 @@ function lookupDottedPath(obj, path) {
});
});
</pre>
-
- * # Buzz client
-
- Let's look at what a buzz client created with the `$resource` service looks like:
- <doc:example>
- <doc:source jsfiddle="false">
- <script>
- function BuzzController($resource) {
- this.userId = 'googlebuzz';
- this.Activity = $resource(
- 'https://www.googleapis.com/buzz/v1/activities/:userId/:visibility/:activityId/:comments',
- {alt:'json', callback:'JSON_CALLBACK'},
- {
- get:{method:'JSONP', params:{visibility:'@self'}},
- replies: {method:'JSONP', params:{visibility:'@self', comments:'@comments'}}
- }
- );
- }
-
- BuzzController.prototype = {
- fetch: function() {
- this.activities = this.Activity.get({userId:this.userId});
- },
- expandReplies: function(activity) {
- activity.replies = this.Activity.replies({userId:this.userId, activityId:activity.id});
- }
- };
- BuzzController.$inject = ['$resource'];
- </script>
-
- <div ng-controller="BuzzController">
- <input ng-model="userId"/>
- <button ng-click="fetch()">fetch</button>
- <hr/>
- <div ng-repeat="item in activities.data.items">
- <h1 style="font-size: 15px;">
- <img src="{{item.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>
- <a href="{{item.actor.profileUrl}}">{{item.actor.name}}</a>
- <a href ng-click="expandReplies(item)" style="float: right;">Expand replies:
- {{item.links.replies[0].count}}</a>
- </h1>
- {{item.object.content | html}}
- <div ng-repeat="reply in item.replies.data.items" style="margin-left: 20px;">
- <img src="{{reply.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>
- <a href="{{reply.actor.profileUrl}}">{{reply.actor.name}}</a>: {{reply.content | html}}
- </div>
- </div>
- </div>
- </doc:source>
- <doc:scenario>
- </doc:scenario>
- </doc:example>
*/
angular.module('ngResource', ['ng']).
factory('$resource', ['$http', '$q', function($http, $q) {