I am trying to update a $scope variable:
ex:
$scope.variable_1
$scope.variable_2
...
I would like to update it this way:
for (i=0; i<2; i++) {
$scope.variable_$i = 1;
}
What I need is to get access to the "$scope.variable_1" using the index "i" in each iteration.
any suggestion? Thanks in advance.