I am working on migrating an Ionic 3 / Angular 5 app to Ionic 5 / Angular 11 and I have a problem with the layout of the page: when I use ion-header
and ion-content
, the content of the page is not scrollable. Here is my code:
<ion-header>
<ion-toolbar>
<ion-item lines="none">
<ion-label>
<ion-title>My title</ion-title>
</ion-label>
</ion-item>
</ion-toolbar>
<ion-content>
<!-- A lot of content here -->
<!-- This is not scrollable -->
</ion-content>
By comparing the new layout with what I have in Ionic 3, while in Ionic 3 the header and the content have an absolute
position with a top padding/offset (all these injected by Ionic), in Ionic 5 the position of the content is relative
without any top padding. I am not sure if this is the real problem or what am I doing wrong, maybe there is something else I need to set. Is there a setting I can use for Ionic 5 so the problem disappears? Please advise. Thanks!