Using "svelte-routing" because I need to load a single page from lots of different urls , with the different urls serving as parameters. For example if a client loads into my-sight/123 the sight needs to load the app.svelte component while passing 123 as a parameter. The Problem is that whatever url I enter after the "my-sight/" I always get a "No webpage was found" page. App.svelte:
<script script lang="ts">
import MenuGenerator from './components/MenuSections/MenuGenerator.svelte';
import { Router, Route } from 'svelte-routing';
</script>
<Router>
<Route path="/:accomodation" component={MenuGenerator} />
</Router>
MenuGenerator.svelte:
<script script lang="ts">
export let accomodation: string;
console.log('hello ', accomodation);
</script>
I've tested this on https://codesandbox.io/s/svelte-routing-forked-ztddj , just add anything after the / in the url and press enter and the same text is in the console.
Edit: We have QR codes and NFC tags, their urls are set and cannot be changed. The urls are my-sight/{qr_code} . I need routing that would redirect every possible url to home and pass in the {qr_code} as a value.