Skip to content

Incorrect route or tabs supplied for IonTabs #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
KiddoV opened this issue Nov 29, 2023 · 3 comments
Open

Incorrect route or tabs supplied for IonTabs #3

KiddoV opened this issue Nov 29, 2023 · 3 comments

Comments

@KiddoV
Copy link

KiddoV commented Nov 29, 2023

Can you tell me what I did wrong here?

Pre-produce:
https://stackblitz.com/edit/github-detvbz?file=src%2Froutes%2F%2Bpage.svelte,src%2Froutes%2F%2Blayout.svelte,src%2Froutes%2Fhome%2F%2Bpage.svelte,src%2Froutes%2Fpeople%2F%2Bpage.svelte,src%2Froutes%2F%2Blayout.ts

I am keep getting this on first load...

Incorrect route or tabs supplied for IonTabs

and this on every time I click on the tab button:

tab with id: "undefined" does not exist

Thanks,

@Tommertom
Copy link
Owner

Hi
I will look at it later

The second is a warning right? You should ignore that one

Tom

@KiddoV
Copy link
Author

KiddoV commented Dec 1, 2023

The first one is the warning, the second one is the error from Ionic - related to this issue #1.

The warning only happened when first time loading the app. Also when first time loading, the route is not going straight to home page. I have to manually click the home tab at the bottom to be able to load home page.

Thanks!

@KiddoV
Copy link
Author

KiddoV commented Dec 8, 2023

I got 2 problems:

  1. The warning when first time load the app.
  2. The route is not going straight to the first tab

... fixed by doing this:

/routes/+page.svelte

<script lang="ts">
import { goto } from '$app/navigation';

setTimeout(() => goto("/overview"), 0);
</script>

I don't know why adding setTimeout() worked.


One problem still remain is the error tab with id: "undefined" does not exist popup every time I switch the tab.

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

No branches or pull requests

2 participants