外部链接以加载Ionic / Cordova应用程序的OUTSIDE [英] External Links to load OUTSIDE of Ionic / Cordova app

查看:272
本文介绍了外部链接以加载Ionic / Cordova应用程序的OUTSIDE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Ionic / Cordova应用程式,载入有时包含外部连结的资讯提供和新闻。我需要在应用程序之外加载这些外部链接,而不是在InAppBrowser中但在手机浏览器中。

I'm working on a Ionic / Cordova app where I load feeds and news that sometimes contain external links. I need to load those external links outside of the app, not in the InAppBrowser but in the phone browser.

这是可能的做为所有链接的默认行为?

Is it possible to do this as a default behavior on all links?

推荐答案

对于外部链接,您必须使用 inAppbrowser Plugin.For包括插件在手机浏览器中打开后,您的reincurment。使用代码

For external links you have to use the inAppbrowser Plugin.For your reqiurment after including the plugin to open in phone browser. use the code

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

/*
_self: Opens in the Cordova WebView if the URL is in the white list, otherwise it opens in the InAppBrowser.
_blank: Opens in the InAppBrowser.
_system: Opens in the system's web browser.
*/

这篇关于外部链接以加载Ionic / Cordova应用程序的OUTSIDE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆