Ionic-framework: tabUrlPath not used

Created on 7 Jul 2017  路  14Comments  路  Source: ionic-team/ionic-framework

Ionic version: (check one with "x")
[ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[ x ] 3.x

I'm submitting a ... (check one with "x")
[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
tabUrlPath is not used and results in tabs URL like /#/nav/n4/tabs.page/tabs/t0/my-page/my.page.

Expected behavior:
tabUrlPath should be used.

Steps to reproduce:

  1. Create a new app with tabs starter
  2. Add tabUrlPath to the tabs
  3. Reload the page and look at the URL

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

global packages:

    @ionic/cli-utils : 1.4.0
    Cordova CLI      : 7.0.1 
    Ionic CLI        : 3.4.0

local packages:

    @ionic/app-scripts              : 1.3.12
    @ionic/cli-plugin-cordova       : 1.4.0
    @ionic/cli-plugin-ionic-angular : 1.3.1
    Cordova Platforms               : android 6.2.3 browser 4.1.0
    Ionic Framework                 : ionic-angular 3.5.0

System:

    Node       : v8.1.3
    OS         : Linux 4.4
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed
    npm        : 5.0.3 

Most helpful comment

@danbucholtz Am I overlooking the way to identify which version of what resolved this bug? People provide their versions for repro, it would seem helpful to have this information for each resolution.

All 14 comments

Thanks for opening an issue. I think @danbucholtz is currently working on the navigation/URLs.

@HugoHeneault,

Shoot, I'll check it out and make sure we account for that. Thanks. I didn't know that was a thing.

Thanks,
Dan

Thanks @danbucholtz
I'm using lazyloading if it can help ;)

@HugoHeneault,

I'm currently using tabUrlPath on four <ion-tabs> and it's working properly on 3.5.0... How are you using it? Are you sure you're passing a string?

I too get "http://localhost:8100/#/nav/n4/page-name". Also using lazy loading.

Yeah I'm passing a string. Have you tried with lazy loading @FdezRomero ?

@HugoHeneault Yes, I'm using lazy loading and the latest @ionic/app-scripts (2.0.0).

tabUrlPath does not appear to be working for me either

global packages:

@ionic/cli-utils : 1.4.0
Cordova CLI      : 7.0.1
Ionic CLI        : 3.4.0

local packages:

@ionic/app-scripts              : 1.3.12
@ionic/cli-plugin-cordova       : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms               : none
Ionic Framework                 : ionic-angular 3.5.0

System:

Node       : v6.11.0
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 3.10.10

@FdezRomero And what URL are you having? I'll check with the new scripts.

@HugoHeneault I used to have /nav/n4/tabs/t0/tab-url-path-here but I noticed that I could get rid of the first navigation segment (/nav/n4) by moving the <ion-tabs> directly to app.component.ts. This left the URL as /tabs/t0/tab-url-path/page-name.

Then I added a name to the tabs with <ion-tabs name="app"> and finally got /tabs/app/tab-url-path/page-name.

In any case, the tabUrlPath input was working well for me since the beginning. I have no idea why isn't working for you.

Do you have a Plunker showing how is your navigation set up? How are your URLs?

I'll try adding the <ion-tabs name="app"> and moving to the app.component.ts (is that a good practice?).

My problem is for making deeplinks (from push notifs for example). I thought I could use /my-tab instead of the /tabs/t0/tab-url-path/my-tab thing

Hi,

This issue no longer exists.

Thanks,
Dan

@danbucholtz Am I overlooking the way to identify which version of what resolved this bug? People provide their versions for repro, it would seem helpful to have this information for each resolution.

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Macstyg picture Macstyg  路  3Comments

vswarte picture vswarte  路  3Comments

MrBokeh picture MrBokeh  路  3Comments

BilelKrichen picture BilelKrichen  路  3Comments

Nick-The-Uncharted picture Nick-The-Uncharted  路  3Comments