title: $http is not a function error in ag-grid
body: <p>I am using Angular Grid (ag-grid) to display data. In my table, whenever user adds a comment by inline editing, i intend to make a rest call and save comment in DB. I have put <code>$http</code> thing to make rest call in <code>newValueHandler</code>. In debugger i see that <code>newValueHandler</code> is invokded but <code>$http</code> is undefined. And then i get the error: <code>Uncaught TypeError: $http is not a function</code></p>
  
  <pre><code>function CompletedActionsCtrl($scope, $http) {
      var columnDefs = [{
          headerName: "Comments",
          field: "comments",
          width: 180,
          filter: 'text',
          editable: true,
          newValueHandler:addCommentHandler,
          valueGetter: function (params) {
              if (params.data.comments != null) {
                  return params.data.comments[0];
              }
          }
      }]
  
  
  function addCommentHandler(params,$http){
      var url = "./postComment";
      $http({method: 'GET',url: url
    }).then(function successCallback(response) {}, function errorCallback(response) {});}
  
  
  //==Controller invoker==
  var app = angular.module('app', ['ngRoute', 'agGrid']);
  app.config(['$routeProvider', function ($routeProvider) {
  $routeProvider.when('/completed_actions', {
          templateUrl: 'completed_actions_partial.html',
          controller: CompletedActionsCtrl
      });
  }]);
  </code></pre>
  
  <p>Seems to be a trivial task, and i am sure i am missing something basic.</p>
  
  <p>P.S. New to Javascript and angularjs.</p>
  
  <p>== Code Flow Explanation ==
  When user hits completed actions tab, <code>CompletedActionsCtrl</code> is invoked by routing. Inside this controller, a grid is prepared and rendered. Now when user edits the comment, and submits it, <code>newValueHandler</code> is invoked which is <code>function addCommentHandler</code></p>
  
  <p>== Update == 
  Got it working by instead of calling a private function as handler, defined an anonymous function.</p>
  
  <p>So removed this -> </p>
  
  <pre><code>newValueHandler:addCommentHandler,
  </code></pre>
  
  <p>And Added this -></p>
  
  <pre><code>newValueHandler:function(params){
                  var url = "./postComment";
                  $http({method: 'GET',url: url})
                      .then(function successCallback(response) {},
                          function errorCallback(response) {});},
  </code></pre>
  
  <p>But the problem is that i need to have this handler at many places, and this approach will cause lot of code duplication. Any better ideas?</p>