找不到 UserCommonModalComponent 的组件工厂。你把它添加到@NgModule.entryComponents了吗?

No component factory found for UserCommonModalComponent. Did you add it to @NgModule.entryComponents?

我在打开 mat model pop 时出错,我在相关模块中添加了入口组件,但无法解决,我们该如何解决请给我建议,请在此处输入图片描述

如果您使用 Mat-Dialog,则必须在 AppModule 文件的 entryComponents 中包含弹出组件。

@NgModule({
    declarations: [ ... , UserCommonModalComponent],
    entryComponents: [..., UserCommonModalComponent],
})

如果您正在使用模式,只需将 ModalModule.forRoot() 放入您的自定义模块