Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with function close() #423

Open
kogutu opened this issue Feb 11, 2019 · 4 comments
Open

Problem with function close() #423

kogutu opened this issue Feb 11, 2019 · 4 comments

Comments

@kogutu
Copy link

kogutu commented Feb 11, 2019

Hello
I have problem with inapp, I want close browser after when event fire. I try use close() but function not working. What Im doing wrong?

This is my code:
const browser = this.inAppBrowser.create(url, '_blank', options);

    const browser = this.inAppBrowser.create(url, '_self', options);
    browser.on("loadstart")
                 .subscribe(
                    (e) => {
                      let u = e.url
                      if(u.includes("search")) {
                        alert("Close");
                        browser.close();
                
                  
                      }
                    },
                    err => {
                      console.log("InAppBrowser Loadstop Event Error: " + err);
});
@dnegi
Copy link

dnegi commented Feb 14, 2019

I too am facing the same issue. Seems similar to[https://github.com//issues/290].

@santhoshbabu-d
Copy link

Try this
u.includes("search",0)
Or
u.match("search")

@kogutu
Copy link
Author

kogutu commented Mar 2, 2019

santhoshbabu-d -- this part of code is working corectly - close() function is't work corectly.

@bharathnallamothu
Copy link

bharathnallamothu commented Apr 30, 2019

i am using inapp for payment gateway in ionic v1..... after returning from payment gateway site i am unable to close window

anywork around ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants