I've defined a class that looks like this:
export class TableColumn {
columnName: string;
isToFilter: boolean;
isToSort: boolean;
isLink: boolean;
linkUrl: string;
columnData: any[];
constructor(
columnName: string,
isToFilter: boolean,
isToSort: boolean,
isLink: boolean,
linkUrl: string,
columnData: any[]
) {
this.columnName = columnName;
this.isToFilter = isToFilter;
this.isToSort = isToSort;
this.isLink = isLink;
this.linkUrl = linkUrl;
this.columnData = columnData;
}
}
In my code, when I use the *ngFor directive to loop over an array of instances of this class like so:
ngFor="let column of tableColumns"
The directive not only iterates through the content of tableColumns
, but also through the content of the columnData
property in each instance.
I'm looking for a way to prevent the iteration through the content of the columnData
property. Please assist me with a solution.