diff options
Diffstat (limited to 'docs/content/cookbook/buzz.ngdoc')
| -rw-r--r-- | docs/content/cookbook/buzz.ngdoc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/content/cookbook/buzz.ngdoc b/docs/content/cookbook/buzz.ngdoc index bf900223..7277f957 100644 --- a/docs/content/cookbook/buzz.ngdoc +++ b/docs/content/cookbook/buzz.ngdoc @@ -12,10 +12,10 @@ to retrieve Buzz activity and comments. <doc:example> <doc:source> <script> - BuzzController.$inject = ['$resource']; - function BuzzController($resource) { - this.userId = 'googlebuzz'; - this.Activity = $resource( + BuzzController.$inject = ['$scope', '$resource']; + function BuzzController($scope, $resource) { + $scope.userId = 'googlebuzz'; + $scope.Activity = $resource( 'https://www.googleapis.com/buzz/v1/activities/:userId/:visibility/:activityId/:comments', {alt: 'json', callback: 'JSON_CALLBACK'}, { get: {method: 'JSONP', params: {visibility: '@self'}}, @@ -24,10 +24,10 @@ to retrieve Buzz activity and comments. } BuzzController.prototype = { fetch: function() { - this.activities = this.Activity.get({userId:this.userId}); + $scope.activities = $scope.Activity.get({userId:this.userId}); }, expandReplies: function(activity) { - activity.replies = this.Activity.replies({userId: this.userId, activityId: activity.id}); + activity.replies = $scope.Activity.replies({userId: this.userId, activityId: activity.id}); } }; </script> |
