Open url inside app in Ionic


#1

Hi all ! Could anyone suggest please … is it possible to open url (website) inside app ?


#2

Off course. You should use the inAppBrowser for that:


#3

luukschoen, good day ! I am trying something like this …

  openUrl() {
    let browser = this.InAppBrowser.create('https://ionicframework.com/');
  }

It open url above app … but is it possible open url inside app (inside page) like iframe ?


#4

You could use an iframe… but this would probably break a lot of stuff.


#5

Nope it isn’t. What are you trying to achieve? Maybe we could suggest a good alternative way. If you want to display another website in your app, you should use an iFrame. But I would discourage you to use an iFrame (although it’s possible with restrictions). Right now there’s no way to use another website in your app then by using an iFrame.


#6

luukschoen, I would like to have the opportunity open website inside app … to do needable thinks on website and go to back for example …


#7

Just open up your website with params in the inappbrowser. If you want to put back stuff into your app, use a deeplink to your app. That’s the best (and most reliable imo) way.


#8

luukschoen, thanks for answer ! But why iFrame it is a bad way ? It is not working well ?