系统浏览器中的离子应用程序打开链接 [英] Ionic application open link in system browser

查看:94
本文介绍了系统浏览器中的离子应用程序打开链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在系统浏览器中打开链接,例如在Safari中的ios和android chrome(无论默认浏览器是什么)中打开链接.

I want to open the link in the system browser, for example in ios in safari and for android chrome(whatever the default browser is).

我遇到的问题是,链接确实在系统浏览器中打开,但同时也在应用程序中打开.我希望链接仅在系统浏览器中打开,而不在应用程序内部打开.

The problem i'm having the that the link does indeed opens in the system browser but it also open in the application. I want the link only to open in the system browser and not inside the app.

这是我的代码.

<a ng-href="http://example.com/login/{{user._id}}" onclick="window.open(this.href, '_system', 'location=yes')" class="ion-home color-primary item"> Dashboard</a>

请记住,即时消息还将ID传递给我的端点.

Keep in mind that im also passing an id to my endpoint.

推荐答案

尝试

<a class="ion-home color-primary item" href="#" onclick="window.open('http://example.com/login/{{user._id}}', '_system', 'location=yes'); return false;"> Dashboard</a>

这篇关于系统浏览器中的离子应用程序打开链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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