title: Angular Material dialog is empty when opened inside Google Maps event listener
body: <p>I am using Angular 6.0.6 and Angular Material 6.3.0 in the project. I've added my dialog component to <code>entryComponents</code> in the app module. The dialog works well if I open it in my dashboard component directly, but in most cases it's empty when I open it in <code>rightclick</code> event handler of a Google Maps marker.</p>
  
  <p>In this case it's empty:</p>
  
  <pre><code>private attachEvents(wo) {
    wo.marker.addListener('rightclick', (e) =&gt; {
      this.dialog.open(DialogAlert, {
        width: '400px',
        data: {
          confirmation: true,
          message: 'test',
          title: 'X'
        }
      });
    });
  }
  </code></pre>
  
  <p>If I put the <code>open</code> code outside <code>wo.marker.addListener</code> it works well.</p>
  
  <p>Will be happy to hear any advice to make it working well inside the event handler. I've tried to call <code>detectChanges</code> (<code>ChangeDetectorRef</code>) inside the event handler but it doesn't help.</p>
  
  <p>The dialog HTML code:</p>
  
  <pre><code>&lt;h1 mat-dialog-title&gt;{{data.title ? data.title : defaultTitle}}&lt;/h1&gt;
  &lt;div mat-dialog-content&gt;
    &lt;p&gt;{{ data.message }}&lt;/p&gt;
  &lt;/div&gt;
  &lt;div mat-dialog-actions&gt;
    &lt;button *ngIf="confirmation" mat-raised-button (click)="onNoClick()"&gt;Cancel&lt;/button&gt;
  
    &lt;button *ngIf="confirmation &amp;&amp; !options" mat-raised-button (click)="onConfirmClick()" cdkFocusInitial&gt;Yes&lt;/button&gt;
    &lt;button color="primary" *ngFor="let o of options;  index as i" mat-raised-button (click)="onConfirmClick(i)"&gt;{{o}}&lt;/button&gt;
  
    &lt;button *ngIf="!confirmation" mat-raised-button (click)="onConfirmClick()" cdkFocusInitial&gt;OK&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>If I put in the HTML something at the beginning (outside <code>mat-dialog-title</code>, <code>mat-dialog-content</code>, <code>mat-dialog-actions</code>) it will be displayed.</p>
  
  <p>And some more info:</p>
  
  <ul>
  <li>No errors/warnings in console.</li>
  <li>I can't close the dialog by click on the shadow area. (I can when it is not empty)</li>
  <li>In very rare cases the content is shown, sometimes with a minor delay. </li>
  <li>When the empty dialog is opened and I resize browser window the content appears.</li>
  <li>I test it in the recent version of Google Chrome</li>
  </ul>