ionic-team / ionic-app-scripts

App Build Scripts for Ionic Projects
http://ionicframework.com/
MIT License
608 stars 304 forks source link

3.0.0 modal components need unique segment #1260

Open ey-aroberts opened 7 years ago

ey-aroberts commented 7 years ago

Short description of the problem:

Prior to ionic-app-scripts 3.0.0 lazy loaded modals just needed an IonicPage decorator. With ionic cli v3 I now have to add a segment or name for them.

What behavior are you expecting?

I would like the old ability to not have a name or segment. This allowed the url to stay the same as the current page on desktop website.

Steps to reproduce:

  1. Create 2 modal components with the below setup. @IonicPage() @Component({ templateUrl: 'test.modal.html', })

  2. Run prod build node --max_old_space_size=4000 ./node_modules/.bin/ionic-app-scripts build --prod

  3. Get following error Error: There are multiple entries in the deeplink config with the segment of test.component

Which @ionic/app-scripts version are you using? The above scenario worked on app-scripts ^2.1.3

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

danbucholtz commented 7 years ago

This seems like a bug. Can you show me in a sample project?

Thanks, Dan

ey-aroberts commented 7 years ago

Hey Dan,

Here is a small example repo.

https://github.com/ztecharoberts/ionic-modal-issue

nrodriguezm commented 7 years ago

Found this issue and this possible solution:

https://forum.ionicframework.com/t/there-are-multiple-entries-in-the-deeplink-config-with-the-segment-of-main-error-after-latest-update/107111

Any suggestions? Thanks.

obedm503 commented 6 years ago

having the same issue. but my use case is with list and details type pages where when clicking in the detail page and refreshing should take back to the list. this worked because they had the same segment. if this is a bad practice, what is the correct way to achieve navigation to the detail view being just "in memory"?

obedm503 commented 6 years ago

while this is addressed a workaround is to add a / at the end of the segment. this fools the check into thinking they're different while the router treats them as the same. so something like page-segment becomes page-segment/. but again THIS IS A HACK not a solution to the bug