Change ion-title with scroll


#1

Hello

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…

home.html

<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>
          </span>
        </h3>
      </button>
    </ion-title>

the title should change as we continue the scroll


#2

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.


#3

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