Skip to content

Instantly share code, notes, and snippets.

@hyunki85
Last active November 17, 2017 05:55
Show Gist options
  • Save hyunki85/ff082fc5aa27e216f498368a0458b620 to your computer and use it in GitHub Desktop.
Save hyunki85/ff082fc5aa27e216f498368a0458b620 to your computer and use it in GitHub Desktop.
ionic inAppBrowser listen event trick,
let browser = this.inAppBrowser.create(url, '_blank','location=no,zoom=no');
browser.on("loadstart").subscribe((event) => {
if(event.url.includes('yourdomain')) {
//do Somthing
browser.executeScript({ code: "window.history.back(-1);" }).then((res) => {
});
}
});
@hyunki85
Copy link
Author

Because ionic native in-app-browser doesn't support addEventListener.

@hyunki85
Copy link
Author

oh~!
And your web link url
ex) button

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment