How I can create an input box having a + and - button. Clicking upon which user can change the quantity of product selected, like this screen:
As for ionic v.1 at your template you could have something like:
<div class="flex_row">
<button class="button icon ion-minus-circled red" ng-click="sub(item)">
<p> {{item.quantity}} </p>
<button class="button icon ion-plus-circled green" ng-click="add(item)">
</div>
At your css
.red:before {
color: red;
}
.green:before {
color: green;
}
.flex_row {
display: -webkit-flex;
display: flex;
-webkit-flex-direction: row;
flex-direction: row;
}
And in your controller
$scope.sub = function(i) {
i.quantity--;
}
$scope.add = function(i) {
i.quantity++;
}