Answer the question
In order to leave comments, you need to log in
How to dynamically update a table?
There is a component that receives data and sends it to the service, and another (with the ngx-datatable) is subscribed to receive this data:
carsArray = []
rows = []
ngOnInit() {
this.share.currentCarsArray.subscribe( carsArray => {
this.carsArray = carsArray
})
}
Answer the question
In order to leave comments, you need to log in
this.data$ = this.http.get('api/table');
<ngx-datatable
class="material striped"
[rows]="data$ | async"
[columns]="columns"
></ngx-datatable>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question