I created a modal and named it
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 pageopens and it calls Notification popover page ,which in turn calls
showworks pageis opened from menu which also calls
worksmodal page. Error comes here
- Disabled decalaration from
// 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 ?