【发布时间】:2023-12-02 22:10:01
【问题描述】:
我在文件夹 app/pipes/safepipe 中有一个管道。
如果我在app/home 中调用此管道,它可以工作。
注意:我已经在home.module.ts中导入并声明了
如果我不在home page 上使用此管道并尝试在app/modals/viewdreportmodal 创建的页面中使用,我会收到错误
注意:我在home page 上使用这个modal page。
The pipe 'safe2' could not be found ("
<ion-text>
{{daily_report_desc }}
<span [innerHtml]="[ERROR ->]daily_report_desc | safe2: 'html'">{{daily_report_desc}}</span>
</ion-text>
<ion-text>
"): ng:///HomePageModule/ViewdreportmodalPage.html@17:25
我无法弄清楚为什么编译器无法识别模态页面中的管道。
【问题讨论】:
-
哪个模块将此模态列为入口组件?
-
模态页面,这里是
app/modals/viewdreportmodal,在它的viewdreportmodal.module.ts中 -
提醒:人称代词为大写字母“I”,无一例外。如果您难以记住这一点,请在浏览器中安装英文拼写检查器,并确保在发布前使用它。
标签: angular typescript ionic-framework ionic3 ionic4