@ersaurabh101 wrote:
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
Notificatonspage as well, so I called it from there too.Problem: Now it is opening from
Notifications page, when I try to open fromshowworks 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 callsworksmodal pageshowworks pageis opened from menu which also callsworksmodal page. Error comes here- Disabled decalaration from
worksmodal.module.ts
// declarations: [WorksmodalPage]Now if I remove
WorksmodalPagefrom Declaration ofshowworks.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 ?
Posts: 1
Participants: 1