I want ng-model
for that button to be in relation with the ng-repeat
:
<a ng-repeat="x in [1,2,3,4]" ng-model="myButton[x]">{{myButton[x]}}</a>
Controller:
var id = 4;
$scope.myButton[id] = ' :( ';
I would like to create a variable whose name is a combination of external values. Also, it would be very much appreciated if you have any tips how such a thing is generally approached, for I think that I am reinventing the wheel in a silly way.