0

I'm using ng-model-options="{ updateOn: 'blur'}" inside ng-repeat and it is updating on blur with the previous value when clicking on the button (increase function).

Example: the value in input box is 10 and clicking on the butt change to 11. but whenever type and editing the input value like changing from 10 to 20 and clicking on the increase button it is taking the previous value 10.

here is my code:

<ion-item ng-repeat="item in filteredItems = (itemLists | filter:search.searchFilter)" ng-click="productSelected(item)" ng-class="{cardactive: item.ItemName == selectedCard}" class="row padding-15px ">

and here is the controller function:

$scope.increaseNumber = function(product){

        if(!(product.quant)) {
            product.quant = 0;
            $scope.itemDetails.push(product);
            sharedData.selectedItemName.push(product.ItemName);
            $scope.products = sharedData.selectedItemName.toString();
        }
        product.quant++;

    }
Mistalis
  • 17,793
  • 13
  • 73
  • 97
Amjad M
  • 1
  • 1
  • sorry, the code in the question is incomplete. here you can find the code: https://jsfiddle.net/495j125s/1/ – Amjad M Mar 27 '17 at 10:57
  • even your code(jsfiddle) is imcompolete. try to make it executable.BTW, you can add the code link to your question directly. – Pengyy Mar 27 '17 at 11:20

0 Answers0