title: Cannot open a component of a shared module via PopoverController
body: <p>I have a ChatPage component in my ionic 5.0.0 project. I just want to open that ChatPage through PopOverController. I know that I have to import the ChatPage module in app.module.ts in-order to open it via PopOverController. I have done this for other component successfully. But here the problem is ChatPage component is a part of a Shared Module. So i'm importing the shared module to every other modules wherever the chat page is required. (rather than importing the shared module in app.module.ts, i'm importing it to each individual modules).</p>
  
  <p>So whenever i'm trying to open ChatPage componet as a popover browser console gives me following error.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>core.js:15724 ERROR Error: Uncaught (in promise): Error: No component factory found for ChatPage. Did you add it to @NgModule.entryComponents?
  Error: No component factory found for ChatPage. Did you add it to @NgModule.entryComponents?
      at noComponentFactoryError (core.js:9877)
      at CodegenComponentFactoryResolver.push../node_modules/@angular/core/fesm5/core.js.CodegenComponentFactoryResolver.resolveComponentFactory (core.js:9915)
      at attachView (fesm5.js:2976)
      at fesm5.js:2917
      at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:391)
      at Object.onInvoke (core.js:17299)
      at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:390)
      at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:150)
      at NgZone.push../node_modules/@angular/core/fesm5/core.js.NgZone.run (core.js:17213)
      at fesm5.js:2912
      at resolvePromise (zone.js:831)
      at zone.js:741
      at rejected (tslib.js:69)
      at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:391)
      at Object.onInvoke (core.js:17299)
      at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:390)
      at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:150)
      at zone.js:889
      at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here is the <strong>shared.module.ts</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>import { NgModule } from '@angular/core';
  import { CommonModule } from '@angular/common';
  import { FormsModule } from '@angular/forms';
  import { Routes, RouterModule } from '@angular/router';
  
  import { IonicModule } from '@ionic/angular';
  
  import { ChatPage } from '../chat/chat.page';
  
  const routes: Routes = [
  ];
  
  @NgModule({
    imports: [
      CommonModule,
      FormsModule,
      IonicModule,
      RouterModule.forChild(routes)
    ],
    declarations: [ChatPage],
    exports: [ChatPage]
  })
  export class SharedPageModule {}</code></pre>
  </div>
  </div>
  </p>
  
  <p>I'm importing this Shared module as follows in other modules wherever i need the Chat functionality.</p>
  
  <p><strong>home.page.ts</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>import { NgModule } from '@angular/core';
  import { CommonModule } from '@angular/common';
  import { IonicModule } from '@ionic/angular';
  import { FormsModule } from '@angular/forms';
  import { RouterModule } from '@angular/router';
  
  import { HomePage } from './home.page';
  import { SharedPageModule } from '../shared/shared.module'
  
  @NgModule({
    imports: [
      CommonModule,
      FormsModule,
      IonicModule,
      RouterModule.forChild([
        {
          path: '',
          component: HomePage
        }
      ]),
      SharedPageModule
    ],
    declarations: [HomePage]
  })
  export class HomePageModule {}</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here is my <strong>app.module.ts</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>import { NgModule } from '@angular/core';
  import { BrowserModule } from '@angular/platform-browser';
  import { RouteReuseStrategy } from '@angular/router';
  
  import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
  import { SplashScreen } from '@ionic-native/splash-screen/ngx';
  import { StatusBar } from '@ionic-native/status-bar/ngx';
  import { AppComponent } from './app.component';
  import { AppRoutingModule } from './app-routing.module';
  import { PopoverPageModule } from './popover/popover.module';
  import { HttpClientModule } from '@angular/common/http';
  import { GlobalFunctions } from '../providers/global-functions';
  import { AuthGuard } from '../providers/security/auth-guard';
  import { HTTP } from '@ionic-native/http/ngx';
  import { HttpProvider } from '../providers/http/http';
  import { HttpAngularProvider } from '../providers/http/http-angular';
  import { HttpNativeProvider } from '../providers/http/http-native';
  import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
  import { NgxUiLoaderModule } from  'ngx-ui-loader';
  import { IonicGestureConfig } from '../providers/IonicGestureConfig';
  import { HAMMER_GESTURE_CONFIG } from '@angular/platform-browser';
  
  @NgModule({
    declarations: [AppComponent],
    entryComponents: [],
    imports: [
      BrowserModule, 
      HttpClientModule, 
      IonicModule.forRoot(), 
      AppRoutingModule, 
      PopoverPageModule,
      //ChatPageModule --&gt; I cannot import in here because it cause an error like 'ChatPage is part of the declarations of 2 modules: ChatPageModule and SharedPageModule! Please consider moving ChatPage to a higher module that imports ChatPageModule and SharedPageModule.'
      NgxUiLoaderModule,
      
    ],
    providers: [
      HttpProvider,
      HttpAngularProvider,
      HttpNativeProvider,
      GlobalFunctions,
      AuthGuard,
      StatusBar,
      ScreenOrientation,
      SplashScreen,
      { provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
      { provide: HAMMER_GESTURE_CONFIG,useClass: IonicGestureConfig },
      HTTP
    ],
    bootstrap: [AppComponent]
  })
  export class AppModule {}</code></pre>
  </div>
  </div>
  </p>