[Fixed] how to use data binding for getting a value from user input and multiplay with contents with {{ …}}


i have a api response i.e price of product, {{price}}

i have a no .of products adding and reducing like

<div class="number-input"> <h2>Price: {{price }}</h2>
        <button onclick="this.parentNode.querySelector('input[type=number]').stepDown()" >-</button>
        <input #qty class="quantity" min="0" max="25" name="quantity" type="number" id="quan" ngModel>
         <button onclick="this.parentNode.querySelector('input[type=number]').stepUp()" class="plus">+</button>

i need somthing like {{price * input.value}} how to achieve this in angular(11)


Here is the solution please follow the below link.

Leave a Reply

(*) Required, Your email will not be published