Cannot read property 'aDataSort' of undefined for dynamic datatable
<p>all from this <strong>http//jsfiddle.net/v6ruo7mj/1/</strong> I created a dynamic data table, now I wanted to add the pagination, so I used jQuery data table and angular data table. but it was throwing <strong>Cannot read property 'aDataSort' of undefined</strong> and <strong>Cannot read property 'parentNode' of null</strong> errors. when I googled and I found it was due to empty <strong>thead</strong>. But I am binding that thead dynamically. there is a slight modification in my code. I added <strong>thead</strong> tag to the header. and <strong>tbody</strong> tag to the rows(data).</p>