Change detection not working on Ionic app


#1

I am working on an Ionic 3 app. It has tinder style cards which can be swiped. When all the cards are over it shows load more button.

  reviewHunt(status: string){
    this.anim[0]= status;
    setTimeout( () => {
      this.anim[0]= undefined  ;
      let hunt;
      hunt = this.hunts.shift();
    })
  },300)

I need the setTimeOut function to remove the card (hunt in the function ) for waiting till an animation finishes. This works well browser. But when I run on my phone it doesnt work well on startup.

When all the hunts are finished it should show load more button. But it doesnt on my phone. It shows the button if i trigger change detection by tapping somewhere.

  <div   class="load-more" *ngIf="hunts.length == 0">
      <div class="load-text" *ngIf="!loading">
        No more hunts.
      </div>
  </div>

The load more div doesnt appear when hunts.length == 0. Why is this happening. And it happens only on the first time I launch the app.