0

I am trying to populate a mat-table with data received from backend in json format. Since there is key associated with each value, I want to use that as column header instead of using a model. I went through the official doc which has only support for static column values. Anyone has any docs or github repos dealing with this issue. I came across one question in stack overflow itself Angular Material Table Dynamic Columns without model. But I have issue with understanding what happens under the comment //GET SOMETHING FROM SERVICE. Any help would be much appreciated, thank you.

1 Answer 1

0

//GET SOMETHING FROM SERVICE

this.listecidenKisi = this.listeciServis.listecidenKisi;
this.listecidenVazife = this.listeciServis.listecidenVazife;

These are both service function that calls back end APIs.

So this.listecidenKisi and this.listecidenVazife are array data from back end.

Please refer following for Angular Http Client.

https://angular.io/guide/http

http://prntscr.com/pvz2f1

Sign up to request clarification or add additional context in comments.

1 Comment

So if i convert the js object from backend to key-value pairs, will I be able to substitute the service call with that data and finally use it in a material table? i dont have ssms installed in my local system to try it right now.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.