On one of my pages I use FormBuilderto fill out a form during initialization. Each input gets a class when the input is not empty. This is done by adding ngClassto each entry and subscribing to FormGroup valueChanges.
My problem occurs whenever a form is populated programmatically. Whenever the user changes any form value, the call valueChangesis called, however, this is not the case when it is used FormBuilder.
My question is how to get an event valueChangesthat will be fired when it ends FormBuilder.
I tried to use this.FormGroup.updateValueAndValidity(), but it didn’t lead to anything.
source
share