Access parameter without load function in svelte kit

Viewed 1410

In SvelteKit, I want to access page.params without using the SSR load function because I want to have client side rendering only. Is there any way to access page.params without the SSR load function?

1 Answers

I got the solution.

import { page } from "$app/stores";
const { slug } = $page.params;

and in this way I got the params without the load function.

Related