Initializing Template Driven Form in Angular 7
问题 I'm looking to initialize certain form fields on a form and then call a function that has a if(this.form.valid) condition on it. on the ngOnInit function I have an API call that gets some basic info and fills it on the form: ngOnInit(){ this.apiService.getInfo(this.user.id).subscribe( userInfo => { this.formModel.fieldA = userInfo.A; this.formModel.fieldB = userInfo.B; this.formModel.fieldC = userInfo.C; this.doStuff(); } ); } However when calling this.doStuff() the form is invalid, even