I have a product-details page, in which I am using another child component product-card.
(我有一个产品详细信息页面,其中使用了另一个子组件产品卡。)
I have imported form module and reactive forms module on both the module files ie product-card.module.ts and product-details.module.ts. (我已经在两个模块文件(即product-card.module.ts和product-details.module.ts)上导入了表单模块和反应形式模块。)
Still facing the error :(. (仍然面临错误:(。)
this is product-details.module.ts
(这是product-details.module.ts)
@NgModule({
imports: [
CommonModule,
FormsModule,
ReactiveFormsModule,
IonicModule,
ProductDetailsPageRoutingModule,
ProductCardModule
],
declarations: [ProductDetailsPage],
exports: [
FormsModule,
ReactiveFormsModule,
ProductCardModule
]
})
export class ProductDetailsPageModule {}
This is product-card.module.ts
(这是product-card.module.ts)
@NgModule({
imports: [
CommonModule,
MaterialModule,
FormsModule,
ReactiveFormsModule
]
})
export class ProductCardModule { }
This is product-card.component.ts where I am using form.
(这是我正在使用表单的product-card.component.ts。)
constructor(private shoppingService: ShoppingService, private cart: CartService) {
this.quantityForm = new FormGroup({
quantity: new FormControl('', [
Validators.required
])
});
}
I am very new at lazy loading in angular and I understand that is where I am missing something.
(我对angular的延迟加载非常陌生,我知道那是我缺少的东西。)
Ionic version is 4 and angular is 8. Thanks. (离子版本为4,角度版本为8。谢谢。)
ask by Aditya Thakur translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…