title: Angular CDK Overlay flexibleConnectedTo doesn't connect to origin
body: <p>I would like to connect an angular cdk overlay to a button in my toolbar.
  That's what I got:</p>
  
  <p>overlay-button.html:</p>
  
  <pre><code>&lt;button mat-menu-item #overlayButton (click)="showOverlay()"&gt; open &lt;/button&gt;
  </code></pre>
  
  <p>overlay-button.component</p>
  
  <pre><code>export class OverlayButtonComponent {
    @ViewChild('overlayButton') private _button: ElementRef;
  
    constructor(private _overlay: OverlayService) {}
  
    showOverlay() {
      this._overlay.open(DisplayedComponent,this._button);
    }
  }
  </code></pre>
  
  <p>overlay.service</p>
  
  <pre><code>export class OverlayService {
    constructor(private _overlay: Overlay) {}
  
    open(comp: ComponentType&lt;any&gt;, connectedTo:ElementRef) {
      const positionStrategy = this._overlay.position()
        .flexibleConnectedTo(connectedTo)
        .withPositions([{
          originX: 'start',
          originY: 'bottom',
          overlayX: 'start',
          overlayY: 'top',
        }]);
  
      const overlayRef = this._overlay.create({
        hasBackdrop: true,
        positionStrategy,
        scrollStrategy: this._overlay.scrollStrategies.reposition()
      });
  
      // Create ComponentPortal that can be attached to a PortalHost
      const filePreviewPortal = new ComponentPortal(comp);
  
      // Attach ComponentPortal to PortalHost
      overlayRef.attach(filePreviewPortal);
  
      overlayRef.backdropClick().subscribe(() =&gt; overlayRef.detach());
    }
  }
  </code></pre>
  
  <p>The problem is that the overlay is always displayed in the top left corner of the Browser.
  First i thought there is a problem with the viewChild, maybe the elementRef is undefined or something like that, but that is not the case. I tried every tutorial I found with similar code and nothing worked. Could the problem be anywhere else?</p>
  
  <p>Here is an illustration of how it is:</p>
  
  <p><a href="https://i.stack.imgur.com/bVT7F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bVT7F.png" alt="overlay problem"></a></p>