title: Using a function in cell template
body: <p>I am using angularjs with ui-grid. One column of the grid contains a timestamp that I would like to render as a properly formatted date.</p>
  
  <p>Up to now, I tried like this but the function is never called.</p>
  
  <pre><code>  $scope.formatDate = function(date) {
      return '42';
    };
  
    $scope.columns = [
      {field: 'date', cellTemplate: '&lt;div class="ui-grid-cell-contents"&gt;formatDate({{row.entity.date}})&lt;/div&gt;'},
      {field: 'title'},
      {field: 'quantity'},
      //[...]
    ];
  </code></pre>
  
  <p>Instead, the function call is considered as a string literal. As a result, the column always displays <code>formatDate(*timestamp*)</code>.</p>
  
  <p>I only found a non-satisfying way of achieving it by defining a function on each single row when receiving them : </p>
  
  <pre><code>  $scope.columns = [
      {field: 'getFormattedDate()'},
      //[...]
    ];
  
    $http.post('/api/data/').success(function (data) {
      $scope.gridOptions.data = data.elements;
  
      $scope.gridOptions.data.forEach(function(row) {
        row.getFormattedDate = function() {
          return '42';
        }
      })
    });
  </code></pre>
  
  <p>Any better suggestion?</p>