Ionic 2 InAppBrowser options not working

InAppBrowser works and it opens the url, but I want it to be more seamless in the experience. Almost to the point where you don't feel like you've really left the app. Whenever I try to pass any options, it doesn't seem to accept. In the docs, this seems straight forward, you are just passing a long comma separated string, but it doesn't work.

I tried:

  const browser = this.iab.create('http://example.net','_self', "location=no,toolbar=no,closebuttoncaption=home,transitionstyle=fliphorizontal");

      

even:

 const browser = this.iab.create('http://example.net','_self', "location='no',toolbar='no',closebuttoncaption='home',transitionstyle='fliphorizontal'");

      

None of these options seem to accept. on iOS it always seems to open the url in the safari webview with the toolbar at the bottom and the url / location bar at the top ...

Is anyone else experiencing this? I should mention that this behavior is for iOS

+3


source to share


1 answer


Use '_blank'

instead '_self'

as a target.

OR



Add this to your config.xml

<access origin="*" />
<allow-navigation href="*" />
<allow-intent href="*" />

      

+4


source







All Articles