I’m new to ionic 2. I don’t know how to access and change the values that are getting submitted with this FormGroup object. I need to change some of the values from this object before call to API.
export class MePage {
reqObject: FormGroup;
constructor(public formBuilder: FormBuilder) {}
ionViewDidLoad() {
this.reqObject = this.formBuilder.group({
userField: ['some value']
})
}
// Thats all I got and it is working fine but now i need to change the value of 'userField' in any method like bellow
changeValue() {
this.reqObject.userField = "some changed value"
// This i need to do.
}
}
Please help me out, thanks in advance