Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

angular2 datatables are not working for dynamic data but working fine for static data #609

Open
Kushmajum801435 opened this issue Nov 12, 2018 · 1 comment

Comments

@Kushmajum801435
Copy link

I'm new in angular2 and I'm trying to structure my data in a data table format. so far it worked fine for static data like when the rows are already present in the html but i need it for data coming dynamically from my backend which is not working and all are coming in one page at the same time.

@HamedBagheri1992
Copy link

ngOnInit() {          
   let param=new DataFilter();
   param.pageNumber=this.page;
   param.pageSize=this.itemsPerPage;
this.dataService.GetAllData(param).subscribe(res=>{      
  this.data=res.data;      
  this.length = res.totalItems;      
  this.numPages=res.totalPage;
  this.rows = this.data;     
});  

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants