【发布时间】:2021-10-29 01:35:18
【问题描述】:
我在 HTML 中有一个简单的引导滑块,我希望它显示一个用户选择的值,而用户仍在决定该值。
现在的html:
<div class="container-sm position-fixed w-25 bottom-0 end-0">
<label for="customRange1" class="form-label" #zoom_label>Example range</label>
<input type="range" class="form-range" id="customRange1" min="0.2" max="5.0" step="0.1"
#zoom (mousedown)="test2(zoom, zoom_label)">
</div>
我正在使用 Angular 12;我尝试使用 OnChange 事件,但仅在用户更改滑块位置时才调用函数。 OnMouseDown 似乎正在调用,但输入的值没有按预期改变。
【问题讨论】:
-
onInput 也许?
标签: javascript html angular typescript