title: Angular Nebular Chat only for one Module and Component
body: <p>I want to integrate only the NbChat into my project.
  At first I just tried to integrate it normally in my whole project, but I got following error as soon as I try to use components with typescript logic (in this case logging in), when the <code>NbThemeModule.forRoot({ name: 'corporate' })</code> is stated as an import in the <code>app.module</code> and when the <code>app.component.html</code> is wrapped in NbLayout:</p>
  <pre><code>ERROR Error: Uncaught (in promise): TypeError: this.container is undefined
  _createContainer@http://localhost:4200/vendor.js:80244:9
  getContainerElement@http://localhost:4200/vendor.js:178191:18
  _createHostElement@http://localhost:4200/vendor.js:180093:32
  create@http://localhost:4200/vendor.js:180060:27
  _createOverlay@http://localhost:4200/vendor.js:112117:30
  _attach@http://localhost:4200/vendor.js:112026:33
  openFromComponent@http://localhost:4200/vendor.js:111963:21
  open@http://localhost:4200/vendor.js:111991:21
  login/&lt;@http://localhost:4200/main.js:7096:68
  __awaiter/&lt;@http://localhost:4200/vendor.js:167019:71
  ZoneAwarePromise@http://localhost:4200/polyfills.js:1317:33
  __awaiter@http://localhost:4200/vendor.js:167015:12
  login@http://localhost:4200/main.js:7084:75.....
  </code></pre>
  <p>Since this breaks everything in the Application, I though of placing the whole chat in a component exported by a sub module which exports it, and imports</p>
  <blockquote>
  <pre><code>NbThemeModule.forRoot({ name: 'corporate' }),
  NbLayoutModule,
  NbEvaIconsModule,
  NbChatModule
  </code></pre>
  </blockquote>
  <p>Vice Versa I import the self written ChatModule then in the <code>app.module.ts</code>.</p>
  <p>Since the same error happens for other people when Nebular Chat Components are not wrapt in nb-layout, so here you can see that the Chat Component is wrapped as follows.:</p>
  <pre><code>&lt;nb-layout&gt;
     &lt;nb-layout-column&gt;
      &lt;nb-chat title=&quot;Drag &amp; Drop chat&quot; size=&quot;medium&quot;&gt;
          &lt;nb-chat-message *ngFor=&quot;let msg of messages&quot;
                           [type]=&quot;msg.type&quot;
                           [message]=&quot;msg.text&quot;
                           [reply]=&quot;msg.reply&quot;
                           [sender]=&quot;msg.user.name&quot;
                           [date]=&quot;msg.date&quot;
                           [files]=&quot;msg.files&quot;
                           [avatar]=&quot;msg.user.avatar&quot;&gt;
          &lt;/nb-chat-message&gt;
          &lt;nb-chat-form (send)=&quot;sendMessage($event)&quot; [dropFiles]=&quot;true&quot;&gt;&lt;/nb-chat-form&gt;
        &lt;/nb-chat&gt;
     &lt;/nb-layout-column&gt;
  &lt;/nb-layout&gt;
     
  </code></pre>
  <p>For some reason I still get the same error.
  Help is appreciated.</p>
  <p><strong>Update1:</strong></p>
  <p>While debugging with Chrome I got more specific Error Codes:</p>
  <pre><code>core.js:4197 ERROR TypeError: Cannot read property 'appendChild' of undefined
  at NbOverlayContainerAdapter._createContainer (index.js:2116)
  at NbOverlayContainerAdapter.getContainerElement (overlay.js:735)
  at Overlay._createHostElement (overlay.js:2637)
  at Overlay.create (overlay.js:2604)
  at MatDialog._createOverlay (dialog.js:673)
  at MatDialog.open (dialog.js:632)
  at ActivejobsComponent.openJobCreation (activejobs.component.ts:72)
  at ActivejobsComponent_div_1_Template_button_click_5_listener (activejobs.component.html:9)
  at executeListenerWithErrorHandling (core.js:14309)
  at wrapListenerIn_markDirtyAndPreventDefault (core.js:14344)
  </code></pre>
  <p>While more testing, it seems like that only Importing NbTheme in any submodule, causes a conflict with all overlays (MatDialog, MatMenu, MatSnackbar, MatSideNav) of Angular Material.</p>