I have a ng-model like that:
<tr ng-repeat="user in users">
<input type="text" ng-model="code[user.id]"/>
When I am using $scope.code = {0: 'value'}; then it successfully assigned but when I want to pass dynamic value like:
var index = 0;
$scope.code = {index: 'value'}
then it will not work.
So my Question is, how to pass dynamic value inside the {}.