why are your fields like that? this is not the right formal technique.
{ key: 'myKey', type: 'my_spinner', defaultValue: 'to.placeholder', templateOptions: { placeholder: 'myValue' }, controller: function($scope) { $scope.down = function () { $scope.model[$scope.options.key]--; }; $scope.up = function () { $scope.model[$scope.options.key]++; }; } }
that the first place that I would start, put in the right format.
Then, if that doesn't work, I will pass the $ index property in the ng-click function: ng-click="up($index)" , and then change the function to $scope.up = function(index) {
MattE source share