Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

IonicPage does not allow for empty segment #888

Closed
ey-aroberts opened this issue Apr 11, 2017 · 2 comments
Closed

IonicPage does not allow for empty segment #888

ey-aroberts opened this issue Apr 11, 2017 · 2 comments

Comments

@ey-aroberts
Copy link

Note: for support questions, please use one of these channels:

https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/

Short description of the problem:

If you leverage IonicPage you cannot have an empty segment.

What behavior are you expecting?

If I have an empty segment for a home page it should route to the empty segment not HomePage which is the components name.

Steps to reproduce:

  1. Add a empty segment to an Ionic Page
  2. Build
insert any relevant code between the above and below backticks

Which @ionic/app-scripts version are you using?
Nightly

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

@danbucholtz
Copy link
Contributor

@ztecharoberts,

We support an empty decorator so I'm not sure I'm following. The DeepLinker will default a segment field. That is required by the deep-linker/router.

Thanks,
Dan

@ey-aroberts
Copy link
Author

Hey @danbucholtz sorry for not providing more info.

Since I am working on creating a website having a default path would be nice for us to have.
Below I would expect the route to be /
@IonicPage({
segment: ''
})

So every time I go to localhost:8100/ I get redirected to localhost:8100/HomePageComponent

for now I have set it to
@IonicPage({
segment: 'home'
})

So every time I go to localhost:8100/ I get redirected to localhost:8100/home

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants