Sort and Filter columns created dynamically in ngTable
<p>In this <a href="http://plnkr.co/edit/weigBKLuiTKp9vY7YRCE?p=preview" rel="nofollow">plunk</a> I have an ngTable with columns created dynamically. The columns are sortable and filterable, however when clicking on the title the sort doesn't work and the filter doesn't work either. Any ideas?</p>

<p>Javascript</p>

<pre><code>var app = angular.module('app', ['ngTable']);

app.controller('myCtl', function($scope,NgTableParams) {

   $scope.cols = [ 
        {nm:'uid', title:'User ID', sortable: 'uid', filter:{uid: 'text'}}, 
        {nm:'ugr', title: 'Group ID', sortable: 'ugr',filter:{ugr: 'text'}} 
      ];


      $scope.data = [ 
        { uid: 'aaa',ugr: '222'},
        { uid: 'bbb', ugr: '111'}
      ];

      $scope.tableParams = new NgTableParams({dataset: $scope.data});

});
</code></pre>

<p>HTML</p>

<pre><code>&lt;div ng-controller="myCtl" ng-app="app"&gt;

  &lt;table ng-table-dynamic="tableParams with cols" show-filter="true" class="table table-bordered table-hover"&gt;
    &lt;tr ng-repeat="row in data"&gt;
      &lt;td ng-repeat="col in cols"&gt;{{row[col.nm]}}&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;

&lt;/div&gt;
</code></pre>