系统浏览器中的离子应用程序打开链接

问题描述:

我想在系统浏览器中打开链接,例如在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>