I have installed In app browser native in ionic 5, I have the following situation
so I get http://localhost/192.168.0.10 ,I would like to remove “localhost” and set only http://192.168.0.10 I have ts method
connect() {
let ip = this.controleDevice['IPAddress'];
this.iab.create(` ${ip}`, `_blank`, `location=no`);
}
I guess let ip = this.controleDevice['IPAddress'];
gives you a string? Why you don’t simply cut the ‘localhost/’ part out before using it in the In App Browser?
@NiklasSchwab So, I’ve already tried this, for example, I used replace:
connect() {
let ip = String(this.controleDevice['IPAddress']);
this.iab.create(`${ip.replace('localhost/', '')}`, `_blank`, `location=no, hidden=no`);
}
but, before, I have a method that get info network
getInfo() {
this.hotspot.getConnectionInfo().then(info =>{
this.controleDevice = info
})
}
but its continue show http:// localhost/192.168.0.10