angular - A problem with push function in angular, how to format the form group before push?
问题描述
This is my function in which I am saving form group into an array and I am getting this error:
ERROR TypeError: control.setParent is not a function
My code:
saveInvolvedParty(){
if( this.From_type=='') {
this.toaster.warning("Plase select InvolvedParty Type")
}
else {
let parti:any=this.transactionControl.controls.involvedParties
parti.push('tparty',this.involvedParty)
console.log('control...',parti);
console.log('control...',this.transactionControl);
this.sendInvolvedPartyToList.emit(this.tparty)
}
解决方案
推荐阅读
- sql-server - 是否可以使用 sqlxmlbulkload 加载此 xml?
- java - Java - If Else 逻辑
- swift - 将子字符串与 Swift 中的另一个子字符串匹配
- php - 在 pdf 的不同页面中显示每个列表项
- python - 在运行代码和调试之前在 PyCharm 中设置对象的值 - Python 3
- python - 从字符串中删除所有多行垃圾?
- c++ - 无法写入 /proc/
/coredump_filter - php - MySQL MariaDB 服务器不会启动 kali linux
- angular - Angular 输入表单在第一次单击时未验证(反应式表单)
- linux - powershell 相当于 bash/linux 中的组对象?