Pregunta

Iam developing an application using phonegap, I need to load load a website(say www.google.com) in my app. How to do this ?

1.I need both ios and android

2.Need to open website in my app, not with native browsers .

¿Fue útil?

Solución

You can use InAppBrowser which is specially designed for this kind of purpose. You can do like this

var ref = window.open('http://apache.org', '_blank', 'location=yes');

for more information regarding InAppBrowser you can see this document.

Otros consejos

You can use iframe as below to load external webpage .

<iframe id="myIframe" src="http://www.google.com" height="200" width="500">

</iframe>

Note :you can have iFrames in your app to show some web pages but you have to be careful about which website you want to load in iFrame because most of the popular websites (FB, Twitter etc) doesn't allow their website to be rendered in iFrame using META tags.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top