angular.module('flapperNews')
.controller('PostsCtrl', [
'$scope',
'posts',
'post',
function($scope, posts, post){
  $scope.post = post;

  $scope.addComment = function(){
    if($scope.body === '') { return; }
    $scope.post.comments.push({
      body: $scope.body,
      author: 'user',
      upvotes: 0
    });
    $scope.body = '';
  };
}]);
@@ -212,34 +212,34 @@
     
-$scope.post.comments.push(
+posts.addComment(post.id, 
 %7B%0A  
@@ -291,20 +291,80 @@
     
-  upvotes: 0
+%7D).success(function(comment) %7B%0A      $scope.post.comments.push(comment);
 %0A   

connect add comment function to DB