I have some experience in Angular4, but I just inherited a piece of code that uses FormControls, and I don\'t know how to work with them. I am setting up a comments textarea th
Having validation at the FormGroup level in the component
this.loginForm = new FormGroup({
'email': new FormControl('example@example.com', Validators.compose([
Validators.required,
Validators.pattern('^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$')
])),
I was able to pluck the email value like this in my function:
email = this.loginForm.value.email
Worked for me - hope it helps you.