1

When data get from ant+ device, page cannot show that on time.

code of ts:

this.antplus.subscribeHR(ID, (response) => {
  this.heartrate = response.heartRate;
}, (error)=>console.log("error:" + error));

code of HTML:

<ion-item>
 <button ion-button (click)="stopSearch();">Stop</button>
 {{heartrate}}
</ion-item>

The value of heartrate just will update when page change.

This problem I also get on ionic-Native/stepcounter

martin clayton
  • 76,436
  • 32
  • 213
  • 198
wai wong
  • 23
  • 3

0 Answers0