我如何获取值更改中的当前formControl名称

问题描述

我在一个表单中有50个控件,我需要在值更改请求中发送表单控件。如何在值更改内找到更改控件名称

 this.formData.valueChanges.subscribe(value => {
          console.log('group valuechanges',value);
        })
        this.formData.valueChanges.pipe(
          filter(x=>x.length> 1),debounceTime(700),distinctUntilChanged(),tap(x=>alert('x'))
          ).subscribe(value => {
    
    let Request= {
            controlName:'',Value:'',id:123
                   };  // frame the request do the service call 
this.myservice.Validate(request).subscribe(x=>{
console.log(x);
});
          // console.log('firstNameControl valuechanges',value);
        });

在内部订阅中,我可以获取价值,如何获取控件名称

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)