I tried to make a scroll for a dialog in reposition strategy, but it doesn\'t work for me.
const scrollStrategy = this.overlay.scrollStrategies.reposition();
con
I was looking for a similar solution as OP. The trick in the provided example is to set overflow:auto
on the .cdk-global-overlay-wrapper
.
Add this css to your styles (not inside the dialog's css):
.cdk-global-overlay-wrapper {
overflow: auto;
}
If you want to prevent scrolling on the back scenery i.e. parent component you could set overflow: hidden
on the parent as long as the dialog is open.
.. just remove the scroll strategy from the example.