Last active
November 17, 2017 05:55
-
-
Save hyunki85/ff082fc5aa27e216f498368a0458b620 to your computer and use it in GitHub Desktop.
ionic inAppBrowser listen event trick,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) => { | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Because ionic native in-app-browser doesn't support addEventListener.