I created a modal and named it worksmodal
.
It opens from page showworks
. Everything works fine.
New requirement - I had to open the same modal from Notificatons
page as well, so I called it from there too.
Problem: Now it is opening from Notifications page
, when I try to open from showworks page
, it gives error-
WorksmodalPage is part of the declarations of 2 modules: NotificationsPageModule and ShowworksPageModule! Please consider moving WorksmodalPage to a higher module that imports NotificationsPageModule and ShowworksPageModule.
Few things for you to note -
- When app opens, by Default
Dashboard page
opens and it calls Notification popover page ,which in turn callsworksmodal page
showworks page
is opened from menu which also callsworksmodal page
. Error comes here- Disabled decalaration from
worksmodal.module.ts
// declarations: [WorksmodalPage]
Now if I remove WorksmodalPage
from Declaration of showworks.module.ts
, it gives error-
WorksmodalPage is not part of any NgModule or the module has not been imported into your module.
What do I need to do so it works from both pages ?