I'm unable to output a variable within my $scope inside an ng-repeat
The following variables are defined inside my $scope: error_question1 , error_question2 , error_question3
I have the below inside an ng-repeat and I'm trying to assign the span's value to the corresponding variable within my $scope using the ng-repeat's $index.
I can get this working by directly targeting the variable but obviously it duplicates for every item in my ng-repeat like so:
<span class="help-block" ng-show="error_question{{$index + 1}}">{{error_question2}}</span>
However, the way I imagine it working does not work:
<span class="help-block" ng-show="error_question{{$index + 1}}">{{error_question[$index + 1]}}</span>
The [$index+1] appears to be breaking it?