且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

*ngFor 在模态内不起作用(angular 10 ionic 5)

更新时间:2023-02-20 15:55:37

我刚刚在此链接中找到了答案:将组件添加到您的 app.module您应该在根应用程序模块中添加 Modal 组件的位置:首先在你的 app.module 中导入 Modal 页面,

I just found the answer in this link: Add the component to your app.module Where you should add the Modal component in the root app module: First import the Modal page in your app.module,

import {ModalPage} from "./home/modal.page"

然后在声明和 entryComponents 中声明它

then declares it inside declarations and entryComponents

declarations: [AppComponent,ModalPage],

entryComponents: [ModalPage],