# Opening a url in Ionic app

**URL:** <https://forum.ionicframework.com/t/opening-a-url-in-ionic-app/31536>\
**Category:** uncategorized\
**Created:** [September 1, 2015, 1:18pm UTC](https://forum.ionicframework.com/t/opening-a-url-in-ionic-app/31536 "2015-09-01T13:18:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toncier](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@Toncier](https://forum.ionicframework.com/u/Toncier)\
**Post date:** [September 1, 2015, 1:18pm UTC](https://forum.ionicframework.com/t/opening-a-url-in-ionic-app/31536/1 "2015-09-01T13:18:03Z")

</div>

I have a problem with opening a URL in my Ionic application. I want to open a link in the browser but fail to do that. In my view I have the URL. When the user will click the link I expect the browser to launch and open it. It don’t have to be the system browser. The link can open in my app since the only thing it will do is download a pdf file.

```
<a href="http://websitename.com/DownloadPdf/PDF/{{Number}}">Download Me!</a>

```

Does anybody know how to do it? I would be grateful.

---

<div class="post-metadata">

**Author:** ![Gajotres](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gajotres/32/98564_2.png) [@Gajotres](https://forum.ionicframework.com/u/Gajotres)\
**Post date:** [September 1, 2015, 1:25pm UTC](https://forum.ionicframework.com/t/opening-a-url-in-ionic-app/31536/2 "2015-09-01T13:25:55Z")

</div>

You can use Cordova InAppBrowser browser for this purpose: [http://www.gajotres.net/how-to-launch-external-application-with-ionic-framework/](http://www.gajotres.net/how-to-launch-external-application-with-ionic-framework/)

```
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
    window.open = cordova.InAppBrowser.open('http://websitename.com/DownloadPdf/PDF/somePDF', '_blank', 'location=yes');
}

```

Or you can open it in a default software, in your case some PDF reader: [http://www.gajotres.net/how-to-open-a-file-using-its-default-application-in-ionic-framework/](http://www.gajotres.net/how-to-open-a-file-using-its-default-application-in-ionic-framework/)

---

<div class="post-metadata">

**Author:** ![Toncier](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@Toncier](https://forum.ionicframework.com/u/Toncier)\
**Post date:** [September 1, 2015, 1:52pm UTC](https://forum.ionicframework.com/t/opening-a-url-in-ionic-app/31536/3 "2015-09-01T13:52:23Z")

</div>

Thx, I will check this out! So the only way to open an external URL is by installing this plugin? Isn’t there a build in way for Ionic? Like in native? Just curious about this 🙂

---

<div class="post-metadata">

**Author:** ![Gajotres](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gajotres/32/98564_2.png) [@Gajotres](https://forum.ionicframework.com/u/Gajotres)\
**Post date:** [September 1, 2015, 5:07pm UTC](https://forum.ionicframework.com/t/opening-a-url-in-ionic-app/31536/4 "2015-09-01T17:07:44Z")

</div>

It can be done in several ways but InAppBrowser is a standard last few years.

---

<div class="post-metadata">

**Author:** ![Toncier](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@Toncier](https://forum.ionicframework.com/u/Toncier)\
**Post date:** [September 3, 2015, 9:22am UTC](https://forum.ionicframework.com/t/opening-a-url-in-ionic-app/31536/5 "2015-09-03T09:22:37Z")

</div>

Yeah, it works 🙂 However InAppBrowser open my link in system browser (a diffrent browser than the one which wrap my app) and this mean that I cant access the site because of luck of authentication. How can I open the URL in my wrapper (Ionic)?
