Is there a way to dynamically change the value of the 'th' colspan attribute based on a condition in Angular?
I have attempted the following code, but it doesn't seem to be working. Can someone point out what might be incorrect here?
<th ng-attr-colspan="{{2}}" ng-repeat="header in ::tableHeaders track by $index">'+ '{{header}}</th>
Alternatively, I have also tried using a function to set the colspan attribute:
<th ng-attr-colspan="someFunct()" ng-repeat="header in ::tableHeaders track by $index">'+ '{{header}}</th>
Although the following code works, I am looking for a way to change the value of the colspan attribute dynamically:
<th colspan="{{2}}" ng-repeat="header in ::tableHeaders track by $index">'+ '{{header}}</th>