OliverMing 2019-05-21 15:16 采纳率: 0%
浏览 604
已结题

angular中,多个组件引用同一个管道

我的情况是这样,多个组件组件同时使用了管道FormatHtmlPipe。报错如下:

Error: Type FormatHtmlPipe is part of the declarations of 2 modules: NewmsgModule and ChatroomPageModule! Please consider moving FormatHtmlPipe to a higher module that imports NewmsgModule and ChatroomPageModule. You can also create a new NgModule that exports and includes FormatHtmlPipe then import that NgModule in NewmsgModule and ChatroomPageModule.

把FormatHtmlPipe直接在app.modules中引入,组件中又提示找不到FormatHtmlPipe

  • 写回答

1条回答 默认 最新

  • dabocaiqq 2019-05-22 09:04
    关注
    评论

报告相同问题?