How to remove the scrollbar in an ionic page


I’m developing a login page and i want to remove the scrollbar, any idea on how to make that happend?
I tried to adda class to ion-content : <ion-content class="bg-image scroll">

and I applied this css code :

 .scroll {
        overflow: hidden;

But it doesn’t work.
Any idea please? Thank you.


@ViewChild(Content) content: Content;


this.platform.ready().then(() => {

private setDisableScroll(disable: boolean) : void {
  let scroll = this.content.getScrollElement(); = disable ? 'hidden' : 'scroll';
1 Like

Hey Rob. I so appreciate your answer. I does work.

I put setDisableScroll(true) like below

ionViewDidLoad() {

I tried so many different css hacks tp prevent scroll and none really worked well for me.

Thanks again!