My AngularJS controller (called 'search') has the variables:
this.redInfo = [...];
this.blueInfo = [...];
this.greenInfo = [...];
this.tableSelector = ''; //this can either be 'red', 'blue', or 'green'
I'm trying to do an ng-repeat
where the info that gets repeated is dependent on the tableSelector
. Is this possible? This is what I have now:
<div ng-repeat="row in {{'search.' + search.tableSelector + 'Info'}} track by $index">