添加构造函数参数时 Ionic 4 黑屏
Ionic 4 blank screen when adding constructor parameter
import { FormBuilder} from '@angular/forms';
这个有效:
constructor(
) { }
但这不起作用:
constructor(
private formBuilder: FormBuilder
) { }
我在执行 ionic serve
时出现空白屏幕
尝试将此处提到的 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 { }
import { FormBuilder} from '@angular/forms';
这个有效:
constructor(
) { }
但这不起作用:
constructor(
private formBuilder: FormBuilder
) { }
我在执行 ionic serve
尝试将此处提到的 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 { }