Change ion-title with scroll


This is my first post on this forum.

i just wanted to get the same functionality of Google Calendar Schedule View, where as we scroll down through the dates, the title on the Navbar changes with the date

Im using this code right now…


<ion-title class="mainTitle">
      <button class="monthButton" ion-button clear (click)="toggleCalendar()" color="dark">
        <h3 id="heading">**March 2018**&nbsp;
          <span id="arrow">
            <ion-icon name="{{myArrow}}"></ion-icon>

the title should change as we continue the scroll

Hmm. The best I can think of is to add a scroll listening like in this answer: Scrolling event in ion-content, get the distance scrolled and do some computation to figure out what content that is, then update a title variable.

1 Like

thank you for your response… i will look into this and let you know