# Tabs and Deep-linking - Open tab using a URL

**URL:** <https://forum.ionicframework.com/t/tabs-and-deep-linking-open-tab-using-a-url/101766>\
**Category:** ionic-v3\
**Created:** [August 12, 2017, 1:29pm UTC](https://forum.ionicframework.com/t/tabs-and-deep-linking-open-tab-using-a-url/101766 "2017-08-12T13:29:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tumain](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/tumain/32/107546_2.png) [@tumain](https://forum.ionicframework.com/u/tumain)\
**Post date:** [August 12, 2017, 1:29pm UTC](https://forum.ionicframework.com/t/tabs-and-deep-linking-open-tab-using-a-url/101766/1 "2017-08-12T13:29:47Z")

</div>

Hi there,

**In short**  
I have an app with tabs, that needs to support deep-linking for 1 page. Any advice?

**Full version**  
I am building an app that has 3 tabs (Home, Album, Contact) and will be available on Android, iOS and the web. I started my build from the ionic-starter project.

One of its features allows the user’s to share an album to others through a URL like this:  
[http://app.com/album/:albumId](http://app.com/album/:albumId)

When the user visits on the link, it only needs to open the web app (no need for Android/iOS), then open the Album tab. Then I need to retrieve the albumId variable, to load the correct album.

I only need to integrate deep-linking for this 1 link - so no routing is required. I have had a look at various deep-linking examples, however, none of them appear to work with the tab structure.

I followed the steps on this page (IonicPage):

> **[Ionic Framework](https://ionicframework.com/docs/api/navigation/IonicPage/)**
>
> Ionic is the app platform for web developers. Build amazing mobile, web, and desktop apps all with one shared code base and open web standards

I also tried to setup IonicPageModule (AlbumPageModule) and am now trying to integrate the deep-linking mechanism using this, but to no avail:

```auto
IonicModule.forRoot(MyApp,
      links: [
        { component: HomePage, name: "home", segment: "" },
        { component: AlbumPage, name: "album", segment: "album/:albumId" }
        { component: ContactPage, name: "contact", segment: "" },
    ]),

```

If anyone can provide any examples on how to execute this or have any first experience on the matter please let me know.

If I’m unable to do this, I will have to manually check the URL on app load and get the variables, which seems a dirty way to achieve this.

Thanks and I appreciate the time you took to read this.

This is my configuration:

```auto
cli packages: (/Users/Justin/Documents/Apps/picsolve/base/node_modules)

    @ionic/cli-plugin-cordova : 1.6.2
    @ionic/cli-plugin-ionic-angular : 1.4.1
    @ionic/cli-utils : 1.7.0
    ionic (Ionic CLI) : 3.7.0

global packages:

    Cordova CLI : 7.0.1 

local packages:

    @ionic/app-scripts : 2.0.2
    Cordova Platforms : android 6.2.3 ios 4.4.0
    Ionic Framework : ionic-angular 3.5.3

System:

    Node : v6.11.0
    OS : macOS Sierra
    Xcode : Xcode 8.3.3 Build version 8E3004b 
    ios-deploy : 1.9.1 
    npm : 3.10.10 

```

---

<div class="post-metadata">

**Author:** ![tumain](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/tumain/32/107546_2.png) [@tumain](https://forum.ionicframework.com/u/tumain)\
**Post date:** [August 30, 2017, 6:54pm UTC](https://forum.ionicframework.com/t/tabs-and-deep-linking-open-tab-using-a-url/101766/2 "2017-08-30T18:54:39Z")

</div>

In the end I decided against using the deeplinks since I couldn’t get what I wanted.

I instead used the window.location.search to fetch parameters in the URL and from there decided which tab to open.

---

<div class="post-metadata">

**Author:** ![ipe\_himanshu](https://avatars.discourse-cdn.com/v4/letter/i/f1d935/32.png) [@ipe\_himanshu](https://forum.ionicframework.com/u/ipe_himanshu)\
**Post date:** [January 19, 2018, 12:14pm UTC](https://forum.ionicframework.com/t/tabs-and-deep-linking-open-tab-using-a-url/101766/3 "2018-01-19T12:14:08Z")

</div>

Can you please share your working code just small code please?
