title: Using Modal from 2 pages - error - Ionic 4
body: <p>I created a modal and named it <code>worksmodal</code>.</p>
  
  <p>It opens from page <code>showworks</code>. Everything works fine.</p>
  
  <p><strong>New requirement</strong> - I had to open the same modal from <code>Notificatons</code> page as well, so I called it from there too.</p>
  
  <p><strong>Problem:</strong> Now it is opening from <code>Notifications page</code>, when I try to open from <code>showworks page</code>, it gives error-</p>
  
  <blockquote>
    <p><code>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.</code></p>
  </blockquote>
  
  <p><strong>Few things for you to note</strong>-</p>
  
  <ol>
  <li><p>When app opens, by Default <code>Dashboard page</code> opens and it calls <strong>Notification popover page</strong>,which in turn calls <code>worksmodal page</code></p></li>
  <li><p><code>showworks page</code> is opened from menu which also calls <code>worksmodal page</code>. Error comes here</p></li>
  <li><p>Disabled decalaration from <code>worksmodal.module.ts</code></p></li>
  </ol>
  
  <p><code>//  declarations: [WorksmodalPage]</code></p>
  
  <p>Now if I remove <code>WorksmodalPage</code> from Declaration of <code>showworks.module.ts</code>, it gives error-</p>
  
  <p><code>WorksmodalPage is not part of any NgModule or the module has not been imported into your module.</code></p>
  
  <p>What do I need to do so it works from both pages ?</p>