How can i navigate to different path on click in svelte?

Viewed 9446

Currently in having on:click | preventDefault="{() => showDetail({id})}" and in showDetail function i want to naviagte to particular id which in i am passing on click of button.

I tried regular javascript methodlocation.assign but this is reloading the page and destroying the purpose of SPA. Is there any way to navigate in svelte without reloading

1 Answers
Related