Skip to content
Discussion options

You must be logged in to vote

Yes you can, by using the $page store from $app/stores.

you can access it in +page.svelte or AnyComponent.svelte

<script>
  import { page } from "$app/stores";

  $: console.log({ slug: $page.params.slug });
</script>

<p>{$page.params.slug}</p>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@205g0
Comment options

Answer selected by 205g0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants