I'm encountering an issue with creating dynamic tables using Angular Material tables. Since the table is reliant on an interface, I have a set number of columns. What I'm aiming for is to generate a table dynamically based on the server's response. Is there a method to create the interface dynamically or something similar? The reason behind this query is that the application might have varying numbers of columns - sometimes 2, other times 3, depending on the array size. My current interface structure appears as follows:
export interface Data {
file: any,
typea: any,
typeb: any
}
Based on this interface, I have 3 columns defined. While there are at least 3 columns present, more may be required depending on incoming data. Unfortunately, I haven't been able to achieve this yet. Any assistance in this matter would be greatly valued.