title: How to use a local JSON object with angular-datatables
body: <p>I would like to do this :</p>
  
  <pre><code>testdata = [{"id":"58",...}]; // local object
  
  $('#test').dataTable({
      "aaData": testdata,
      "aoColumns": [
          { "mDataProp": "id" }
      ] });
  </code></pre>
  
  <p>with the angular-datatables module. I have tried this : </p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>$scope.dtOptions = DTOptionsBuilder.fromSource('[{"id": 1}]')
          .withDataProp('data')
          .withBootstrap()
          .withPaginationType('full_numbers');
  $scope.dtColumns = [
          DTColumnBuilder.newColumn('id').withTitle('ID')
  ];
  </code></pre>
  
  <p><strong>View</strong></p>
  
  <pre><code>&lt;table datatable="" dt-options="dtOptions" dt-columns="dtColumns" class="table table-striped table-bordered"&gt;&lt;/table&gt;
  </code></pre>
  
  <p>But it doesn't work at all, and I get this error message :</p>
  
  <blockquote>
    <p>DataTables warning: table id=DataTables_Table_0 - Ajax error. For more information about this error, please see <a href="http://datatables.net/tn/7">http://datatables.net/tn/7</a></p>
  </blockquote>
  
  <p>Also, I can't use any Ajax options to get json data from an URL, because my angularjs project uses Express and the Rest API, so I get 401 not authorized error while trying to get my data with a GET/POST URL like "/api/data/getJsonData".</p>
  
  <p>Any ideas ? Thanks.</p>