Ionic 2 - <scroll-content> Margins


Hi Guys,

As of a recent beta (I think it was beta 9), Ionic has auto-sized <scroll-content> to fit the various footer bars. Because there are issues with Keyboard pushing the tabbar up (see #7047), I am trying to hide the tabbar and remove the scroll-content margin that came with it. Anyone has any clue if this is possible?

Some of the code I’m trying out is below:

let scroll = <HTMLElement>document.getElementsByTagName('SCROLL-CONTENT')[0]; let tabbar = <HTMLElement>document.getElementsByTagName('ION-TABBAR')[0]; = '0px';


Hey guys,

Quick update and solve. The way to do it is to put a [class] attribute on <ion-content>, and manipulate it using Angular’s template syntax.

Hope this helps anyone who is trying to workaround the old keyboard problems. If you need a detailed codepen/plunker, I will be happy to provide!


Can you give a sample codepen?

i’ve tried many solutions but nothing worked with RC5.

Thank you in advance.