I want to configure an overlay for with overlay.position().flexibleConnectedTo() because connectedTo() is deprecated as per the official docs.
Otherwise there is a quesstion having a good answer for connectedTo()
Here is my Code
const origin:FlexibleConnectedPositionStrategyOrigin=this.RefElem;
const overlayConfig = new OverlayConfig();
overlayConfig.positionStrategy = this.overlay.position().flexibleConnectedTo(origin);
const overlayRef = this.overlay.create(overlayConfig);
const userProfilePortal = new ComponentPortal(
GraphMetaSignalSelectorComponent
);
overlayRef.attach(userProfilePortal);
but getting this error: "ConnectedToFlexibleConnectedPositionStrategy: At least one position is required. at FlexibleConnectedPositionStrategy.push"