title: Angular2 - sa-datatable loads data only for the first time
body: <p><strong>The datagrid</strong>:</p>
  
  <pre><code>&lt;sa-datatable [options]="{
                  data: bundles,
                  columns: [ {data: 'srNo'}, {data: 'name'}, { data: null, defaultContent: '&lt;button class=\'btn btn-default\'&gt;Details&lt;/button&gt;' } ] }"
                  paginationLength="true" tableClass="table table-striped table-bordered table-hover" width="100%"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th data-hide="phone"&gt;Sr. No.&lt;/th&gt;
              &lt;th data-class="expand"&gt;&lt;i class="text-muted hidden-md hidden-sm hidden-xs"&gt;&lt;/i&gt; Name&lt;/th&gt;
              &lt;th&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
  &lt;/sa-datatable&gt;
  &lt;div&gt; {{bundles.length }} &lt;/div&gt;
  </code></pre>
  
  <p><strong>The component</strong>:</p>
  
  <pre><code>Component({
      selector: 'tax-receipting-bundles',
      templateUrl: './tax-receipting-bundles.component.html',
      providers: [ TaxReceiptingBundleService ]
  })
  
  export class TaxReceiptingBundlesComponent implements OnInit  {
      bundles: TaxReceiptingBundle[];
  
      constructor(private service: TaxReceiptingBundleService) {
          this.bundles = [];
      }
  
      ngOnInit() {
          this.service.getBundles()
              .then(b=&gt; {
                  this.bundles = b; 
                  console.log(this.bundles);
          });
  }
  </code></pre>
  
  <p><strong>The service:</strong></p>
  
  <pre><code>@Injectable()
  export class TaxReceiptingBundleService {
      getBundles() {
          return Promise.resolve(TAXRECEIPTINGBUNDLES);
    }
  }
  </code></pre>
  
  <p><strong>Mock Data</strong></p>
  
  <pre><code>export const TAXRECEIPTINGBUNDLES: TaxReceiptingBundle[] = [
      {id: 1, srNo: 1, name: 'Bundles for February 2005'},
      {id: 2, srNo: 2, name: 'CDN Bundles'},
      .
      .
      {id: 12, srNo: 12, name: 'Bundles for April 2004'},
  ];
  </code></pre>
  
  <p>When I navigate to the component containing the datagrid, it shows the data correctly (12 records).</p>
  
  <p>However, when I navigate away and come back to the same component, the grid is empty. However, the <code>console.log</code> in the <code>ngOnInit()</code> always logs all 12 records. But they're just now showing in the grid.</p>
  
  <p>But the <code>bundles.length</code> prints 12 under the table -</p>
  
  <p><a href="https://i.stack.imgur.com/Vyhe7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Vyhe7.png" alt="enter image description here"></a>
  How can I fix this?</p>