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

https://segmentfault.com/q/1010000007630133?_ea=1404888