-
Notifications
You must be signed in to change notification settings - Fork 97
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
how to pass data from api to angular-2-data-table #3
Comments
did you solve this? I have the same issue right now. |
in DEMO1 itemResource = new DataTableResource(persons); The only example I see uses a hard coded Json string array 'persons' that is assigned when the itemResource object is created. I don't understand why 'DataTablResource' which seems like it is the import for the tool component would have a dependency on local data. I am pulling my table data content from an observable that has a callback that parses the Json Seems like I can only use this Data Table 2 if create an object with data before I actually get |
You need to this with your JSON results: this.resultsResource = new DataTableResource(this.results); That's what I do and it works. |
@bofcarbon1 did u resolve this issue. I'm stuck |
Hi all,
below is my result JSON from api. how to bind this data to Datatable please help me .
[{"Building":"B85","DeviceID":"402072","PumpNo":3,"EventDateTime":"2017-01-30T23:16:00"},{"Building":"B85","DeviceID":"402072","PumpNo":6,"EventDateTime":"2017-01-30T23:17:00"},{"Building":"B85","DeviceID":"402072","PumpNo":7,"EventDateTime":"2017-01-30T23:17:00"},{"Building":"B85","DeviceID":"402072","PumpNo":8,"EventDateTime":"2017-01-30T23:09:00"}]
The text was updated successfully, but these errors were encountered: