Ionic3 Two-Way binding not work on cordova-plugin-antplus

48 Views Asked by At

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

0

There are 0 best solutions below