Href to an external URL displays web site but impossible to return to app


I hve the following code on the page Info of my app (built on the tabs sample)

< ion-view title=“L’application” class=“has-header”>
< ion-content padding=“true”>
< div class=“list card”>
< div class=“item item-body item-text-wrap”>
< a href=“”>HELP
</ div>
</ div>
</ ion-content>
</ ion-view>

The link goes to my help page, but I can’t com back to my application.
Is there a way to make it work ?

The best way is to open the site into the phone’s browser. But I don’t know how.

Thanks for your help

Include the cordova inappbrowser plugin in your project:

…and then add target="_blank" to your <a …> tag to open it in a pop-up browser in your app. Use target="_system" to flip away from your app open it in the native browser.

1 Like

Thanks a lot ! It worked and you saved my evening :slight_smile:

1 Like

I’m having the same issue.
I’m trying not to use cordova plugins, because I basically want to also build a web app but the following code isn’t working as I expected:


<a ng-repeat="contItems in arrayContacts" class="item item-icon-left btn" href="{{contItems.url}}" target="_blank">
        <i class="icon at-icons {{contItems.icon}}"></i>

The issue is it open inapp without any kind of back button (which ruins everything on iOS).

Is there any solution/explanation for this behaviour ?

I use this directive (with inappbrowser plugin):

angular.module(‘xxx’).directive(‘externalLink’, function(){
‘use strict’;
return {
restrict: ‘A’,
scope: {
url: ‘@href
link: function(scope, element, attrs){
element.bind(‘click’, function(e){
if (typeof analytics !== ‘undefined’) {‘event’, ‘outlink’, encodeURI(scope.url));
}, ‘_system’, ‘location=yes’);

then add external-link to the that I want to open in system browser.