日语字符不绑定到角度形式控件

问题描述 投票:0回答:1
angular forms
1个回答
0
投票
<input type="text" (input)="onInputChange($event)">

Ts

onInputChange(event: Event): void {
   const inputElement = event.target as HTMLInputElement;
   const inputValue = inputElement.value;
   console.log(inputValue);
}
© www.soinside.com 2019 - 2024. All rights reserved.