import { FormBuilder} from '@angular/forms';
这有效:
constructor(
) { }
但这不起作用:
constructor(
private formBuilder: FormBuilder
) { }
在进行ionic serve
时出现空白的白屏
答案 0 :(得分:1)
尝试将此处提到的ReactiveForms添加到您的应用模块:
https://angular.io/guide/reactive-forms#step-1-registering-the-reactive-forms-module
import { ReactiveFormsModule } from '@angular/forms';
@NgModule({
imports: [
// other imports ...
ReactiveFormsModule
],
})
export class AppModule { }