//用[(ngModel)]="val"绑定name值,再通过ngModelChange监听值变
<input type="text" name='val' [(ngModel)]="val" (ngModelChange)='getval($event)'>
getval(val){
console.log(val)//打印获取的值
}
//用[(ngModel)]="val"绑定name值,再通过ngModelChange监听值变
<input type="text" name='val' [(ngModel)]="val" (ngModelChange)='getval($event)'>
getval(val){
console.log(val)//打印获取的值
}