I have a button and an input in html:
<button ng-click="addQuantity()" class="btn btn-xs btn-info pull-right">+</button>
<input readonly type="text" value="{{ quantity || 1 }}" class="form-control totalQuantity pull-right"></input>
And the AngularJS code:
$scope.addQuantity = function(id){
}
I just want to increment the input.value (which default is 1), with every click on the button. I would to it by myself, but I don't know the most efficient way to do it.
If you have any hints for me, please share. Thank you!
Edit
The id is the id from ng-repeat:
<li class="list-group-item" ng-repeat="(id, product) in itemsToBuy">
The input is added with every repeat of li element.
Edit2: There's a fiddle with whole app: https://jsfiddle.net/scgsc7or/3/