How to open link EXTERNALLY

I don’t want the in app browser to open, I want it to open in safari/chrome


You can open it using the inAppBrowser plugin,
you can have it here

cordova plugin add cordova-plugin-inappbrowser

You then import it in .ts file
import {InAppBrowser} from 'ionic-native';

Or if you have native 3.x import in ionic native 3.x
import { InAppBrowser } from '@ionic-native/in-app-browser';

use this
let browser = new InAppBrowser('url', '_system'); //For system browser, you'll be prompt to choose your browser if you have more than one let browser = new InAppBrowser('url', '_blank'); //For webview,

get more information here


Hey, not OP but this don’t seem to work for me.

Ionic version 2.2.1

I am looking at this documentation here.

Using that I am getting a lot of error using it. I am not sure if I am using the iab correctly in my html.

Can you explain it with a button click example?

My .ts file

import { Component } from ‘@angular/core’;

import { NavController } from ‘ionic-angular’;

import { InAppBrowser } from ‘@ionic-native/in-app-browser’;

constructor(private iab: InAppBrowser) { }

selector: ‘page-home’,
templateUrl: ‘home.html’
export class HomePage {

constructor(public navCtrl: NavController) {


const browser = this.iab.create(‘’);



    <button class="button" ion-button block (click)='OpenUrl();'>

What am I doing wrong. Newbie, so please don’t mind if it’s silly!


Good evening, express yourself well. What do you get as a mistake?


With the same code, I have this error :

Runtime Error
Error in ./MyApp class MyApp - caused by: No provider for InAppBrowser!

The solution :

Add : providers: [InAppBrowser]

I can’t open an url using an external browser like safari, on iOS. Ionic 3

I think the constructor is wrong you should have something like this:

constructor(public navCtrl: NavController, private iab: InAppBrowser) { }

to add module first do:

ionic cordova plugin add cordova-plugin-inappbrowser
npm install --save @ionic-native/in-app-browser

then follow above or see

try this:"",'_system', 'location=yes');

it worked for me. tanx

1 Like

This is the best answer i was looking for


Simple and elegant, thanks!

1 Like

This does not work on iOS.

1 Like

Did you resolve it with iOS?

You will also have to install the InAppBrowser plugin. Only installing this plugin it work :slight_smile:

Is there any way to open a local HTML file (ex: asset>test>test.html) by in ionic?

1 Like

My solution

document.onclick =  (e) => {
          let event = e || window.event;
          let element: any = || event.srcElement;
          if(element.tagName !== 'A')
            element = element.parentNode;
          if(element.tagName == 'A' && element.href !== undefined){
            if (this._isApp){
                this.iab.create(element.href, "_system", "location=yes,enableviewportscale=yes");
      , "_system", "location=yes");
            return false;


just remove the <allow-navigation from the config.xml

It’s works!, Thanks! :slight_smile: