如何使用数据绑定从用户输入中获取值并使用 {{ ...}} 与内容进行多重播放
how to use data binding for getting a value from user input and multiplay with contents with {{ ...}}
我有一个 api 响应,即产品价格,{{price}}
我没有添加和减少喜欢的产品
<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>
</div>
我需要像 {{price * input.value}}
这样的东西 如何在 angular(11)
中实现
我有一个 api 响应,即产品价格,{{price}}
我没有添加和减少喜欢的产品
<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>
</div>
我需要像 {{price * input.value}}
这样的东西 如何在 angular(11)