Feb 24, 2017 · 1 min read
This article **rules**: my colleagues and I couldn’t find any docs on testing FormBuilder stuff, so this saved us a lot of time. Thank you!
I noticed that on lines 30–32 of login.component.ts, you’re manually keeping this.formValidin sync with this.loginForm.valid. Could you do away with this and just use this.loginForm.valid? In general, it’s best to avoid duplicating state and manually syncing it, but I don’t know ng2 well enough to know if there’s a reason for it in this case.
