Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70435

Ionic 3 code convert into ionic 5 or 4

$
0
0

@AvkAvk wrote:

blePopup() {
let alert = this.alertCtrl.create();
alert.setTitle(‘Select NautAlert Unit’);
for(let i=0; i< this.devices.length; i++) {
alert.addInput({
type: ‘radio’,
label: this.devices[i].name,
valae: this.devices[i].id
});
}
alert.addButton(‘Cancel’);
alert.addButton({
text: ‘Ok’,
handler: device => {
//this.setStatus('Connecting to ’ + (device.label || device.value));
//this.setStatus(JSON.stringify(device));
// This is not a promise, the device can call disconnect after it connects, so it’s an observable
this.ble.connect(device).subscribe(
peripheral => this.onConnected(peripheral),
peripheral => {
this.showAlert(‘Disconnected’, ‘The peripheral unexpectedly disconnected’);
this.disconnect();
}
);
}
});
alert.present();
}

for ionic developer

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>