У меня angular реактивная форма с формаром. Когда я использую valueChanges, я получаю:
core. js: 1624 ERROR RangeError: Превышен максимальный размер стека вызовов
this.addmemberForm.get('FamilyInfo.newchildren').valueChanges.pipe(distinctUntilChanged())
.subscribe(val => {
const kofi = [val];
console.log(kofi);
const ydaw = kofi[0];
const rad =ydaw[ydaw.length - 1]
console.log(rad);
const akwa =ydaw.indexOf(rad);
console.log(akwa);
this.index = akwa;
this.productcount = rad.profession;
if(this.productcount !==null){
console.log(this.productcount);
this.products= this.productcount
this.item = this.products.stockname;
(<FormArray>this.addmemberForm.get('FamilyInfo.newchildren')).at(this.index).get("item").patchValue(this.item);
}
});