I'm adding/removing controls from my form based on some conditions.
if(true) {
this.form.addControl('age', new FormControl(this.resp.age));
}
this.form.get('age').valueChanges.subscribe(val => {
//Do something.
});
So what exactly is required here is when a control is added, I need to trigger the valuechanges asosciated with this control. I know that when this control is added and value is set, the valuechanges is not in scope till that time and comes into the picture later. So what can be done here to trigger it when control is added.