I am fetching data from an API and rendering it using Angular 2.
getData() {
this.http.get('api/Employee').subscribe(result => {
var localdata = result.json();
for (var i = 0; i < localdata.length; i++)
this.employeeList.push(localdata[i]);
console.log(this.employeeList);
$('#example').DataTable();
})
}
Once I get the data I have to convert the normal table to Jquery Datatable using
$('#example').DataTable();
But I am facing below issue shows: No data available in table along with data.
