if you want to remove the scroll dynamically. You can use the approach of removing the scroll-y
class from shadowDOM at <main class="inner-scroll scroll-y"></main>
within <ion-content></ion-content>
.
Firstly, import { Renderer2 } from '@angular/core'
in your constructor(renderer: Renderer2)
To reach this, in your your-component.component.ts
at event cycle ngAfterViewInit
or onward.
This will remove the scroll from the page activated in your app.
for(let el of Array.from(document.querySelectorAll(".ion-page:not(.ion-page-hidden) ion-content")))
{
this.renderer.removeClass(el.shadowRoot.querySelector("main[part=scroll]"), "scroll-y");
}
This will add the scroll from the page activated in your app.
for(let el of Array.from(document.querySelectorAll(".ion-page:not(.ion-page-hidden) ion-content")))
{
this.renderer.addClass(el.shadowRoot.querySelector("main[part=scroll]"), "scroll-y");
}