【发布时间】:2019-10-05 20:39:15
【问题描述】:
我可以使用“ionic cordova build android”构建我的 ionic 项目,但该应用在设备上运行缓慢。经过一些研究,我了解到应该使用“ionic cordova build android --prod”来构建它以提高性能。然而,这是我在运行“ionic cordova build android --prod”时遇到的错误
Type PinnedmessagesComponent in project/src/components/pinnedmessages/pinnedmessages.ts is part of the declarations of 2 modules:
ComponentsModule in project/src/components/components.module.ts and
ProfilePageModule in project/src/pages/profile/profile.module.ts!
Please consider moving PinnedmessagesComponent in project/src/components/pinnedmessages/pinnedmessages.ts to a higher module that imports ComponentsModule in project/src/components/components.module.ts and
ProfilePageModule in project/src/pages/profile/profile.module.ts.
You can also create a new NgModule that exports and includes PinnedmessagesComponent in project/src/components/pinnedmessages/pinnedmessages.ts then import that NgModule in ComponentsModule in project/src/components/components.module.ts and
ProfilePageModule in project/src/pages/profile/profile.module.ts.
Pinnedmessages 是我创建的一个组件,我在另一个名为 ProfilePage 的页面中使用它。请告诉我如何解决这个问题。谢谢
【问题讨论】:
标签: angular typescript ionic-framework