title: Angular4: Datatable taking time to load large data
body: <p>I've a datatable which is taking lot of time to show the data</p>
  
  <p>I called the script like this in the component: </p>
  
  <pre><code>  ngAfterViewInit() {
      $.getScript('./assets/js/datatables/datatable-basic.js');
    }
  </code></pre>
  
  <p>And rendering data in html like this</p>
  
  <pre><code>&lt;table class="table zero-configuration"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
            &lt;th&gt;Name&lt;/th&gt;
            &lt;th&gt;ID&lt;/th&gt;
            &lt;th&gt;&lt;/th&gt;
          &lt;/tr&gt;
       &lt;/thead&gt;
       &lt;tbody&gt;
          &lt;tr *ngFor="let companyData of company?.companies; trackBy: userThumb"&gt;
              &lt;td class="text-truncate"&gt;{{ companyData?.name }}&lt;/td&gt;
              &lt;td class="text-truncate"&gt;{{companyData?.id}}&lt;/td&gt;
              &lt;td class="text-truncate"&gt;&lt;/td&gt;
          &lt;/tr&gt;
       &lt;/tbody&gt;
      &lt;/table&gt;
  </code></pre>
  
  <p>Here's my datatable-basic.js</p>
  
  <pre><code>setTimeout(function () {
      $('.zero-configuration').DataTable({
        "iDisplayLength": 50,
        "paging": true
      });
  }, 3000);
  </code></pre>
  
  <p>The companies will be having nearly 5000 arrays.</p>