Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230552

_co.myFunction(inc()) is not a function

$
0
0

.ts file

inc(){
this.item_qty += 1;
console.log(this.item_qty + 1);
}

//decrements item

dec(){
if(this.item_qty-1 < 0){
  this.item_qty = 0;
  console.log('item_1->' + this.item_qty)
}
else{
  this.item_qty -= 0;
  console.log('item_2->' + this.item_qty);
}
}

This is my html

  <button (click)="inc()"  ion-button icon-only small>
      <ion-icon name="add-circle"></ion-icon>
    </button>

Viewing all articles
Browse latest Browse all 230552

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>