Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 40e34a9

Browse files
committed
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.
1 parent 90f8707 commit 40e34a9

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

src/ngResource/resource.js

-52
Original file line numberDiff line numberDiff line change
@@ -253,58 +253,6 @@ function lookupDottedPath(obj, path) {
253253
});
254254
});
255255
</pre>
256-
257-
* # Buzz client
258-
259-
Let's look at what a buzz client created with the `$resource` service looks like:
260-
<doc:example>
261-
<doc:source jsfiddle="false">
262-
<script>
263-
function BuzzController($resource) {
264-
this.userId = 'googlebuzz';
265-
this.Activity = $resource(
266-
'https://www.googleapis.com/buzz/v1/activities/:userId/:visibility/:activityId/:comments',
267-
{alt:'json', callback:'JSON_CALLBACK'},
268-
{
269-
get:{method:'JSONP', params:{visibility:'@self'}},
270-
replies: {method:'JSONP', params:{visibility:'@self', comments:'@comments'}}
271-
}
272-
);
273-
}
274-
275-
BuzzController.prototype = {
276-
fetch: function() {
277-
this.activities = this.Activity.get({userId:this.userId});
278-
},
279-
expandReplies: function(activity) {
280-
activity.replies = this.Activity.replies({userId:this.userId, activityId:activity.id});
281-
}
282-
};
283-
BuzzController.$inject = ['$resource'];
284-
</script>
285-
286-
<div ng-controller="BuzzController">
287-
<input ng-model="userId"/>
288-
<button ng-click="fetch()">fetch</button>
289-
<hr/>
290-
<div ng-repeat="item in activities.data.items">
291-
<h1 style="font-size: 15px;">
292-
<img src="{{item.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>
293-
<a href="{{item.actor.profileUrl}}">{{item.actor.name}}</a>
294-
<a href ng-click="expandReplies(item)" style="float: right;">Expand replies:
295-
{{item.links.replies[0].count}}</a>
296-
</h1>
297-
{{item.object.content | html}}
298-
<div ng-repeat="reply in item.replies.data.items" style="margin-left: 20px;">
299-
<img src="{{reply.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>
300-
<a href="{{reply.actor.profileUrl}}">{{reply.actor.name}}</a>: {{reply.content | html}}
301-
</div>
302-
</div>
303-
</div>
304-
</doc:source>
305-
<doc:scenario>
306-
</doc:scenario>
307-
</doc:example>
308256
*/
309257
angular.module('ngResource', ['ng']).
310258
factory('$resource', ['$http', '$q', function($http, $q) {

0 commit comments

Comments
 (0)