I'm looking for a way to bind numbers to buttons. For example, when you press 1 on a calculator, the number '1' is bound to it and displays on a monitor. Is there any way I can attach the number 1 to a button in Ionic?
Thanks
You mention typescript so its ionic-2 i guess,I suggest to use angular way of binding.
first declare variable in typescript file
file.ts
displayNum:any;
for displaying
file.html
<button ion-button>{{displayNum}}</button>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With