this.editForm = this.fb.group({
step1: this.fb.group({
transport_type_id: ['', [Validators.required]],
flight_code: ['', []],
}),
stops: this.fb.array([
this.initStop() //adds dynamicaly the fields, but I want to watch the whole array
])
});
If I want to "valueChanges" for the step1.transporter_id only then this observable works fine
this.editForm.controls.step1.get('flight_code').valueChanges.subscribe(data => {});
What is the syntax if I want to "watch" the "stops: this.fb.array".
Examples that don't work
this.editForm.controls.stops.get().valueChanges.subscribe(data => {});
this.editForm.controls.stops.get('stops').valueChanges.subscribe(data => {});
this.editForm.get('stops').valueChanges.subscribe(data => {});