Having an issue, let's take a look at the structure
<ion-view>
<ion-header-bar class="bar-subheader">
</ion-header-bar>
<ion-content class="has-header has-subheader has-footer">
</ion-content>
<ion-footer-bar>
</ion-footer-bar>
</ion-view>
I need to dynamically adjust the position of the ion-content
based on the height of the text in the ion-header-bar
. The problem is that the positioning of the ion-content
is fixed according to the ionic css file, with a default height of 44px for the bar class. Even if the header expands due to longer text, the ion-content
remains fixed.
My question is how can I dynamically update the position of the ion-content?
I attempted using ng-style
with document.querySelector
to get the current height of the subheader, but it didn't update in real-time. This means that when the header expands or collapses, the value fetched by document.querySelector
isn't correct.
I know that Ionic 2.0 has a resize() function that can handle this, but since I'm working with Ionic 1.x, I'm seeking a solution specifically for that version.
Appreciate any guidance on this matter.