I am currently working on implementing AddeventListener to listen for 'Exit' and 'LoadStart' events in InAppBrowser within IONIC2.
Here is my HTML:
<button (click)="browsersystem('https://www.google.com')" > Visit URL</button>
And here is my TypeScript file:
browsersystem(url:string)
{
this.platform.ready().then(() => {
let browser=open(url, "_system", "location=true");
browser.addEventListener('exit',()=>
{
console.log('Browser Closed');
alert('Browser Closed');
})
browser.addEventListener('loadstart',()=>
{
console.log('Browser Started');
})
});
}
No errors are showing up on the console, but I feel like I might be missing something. Any ideas?