Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

Why different outputs of dynamic route in svelte (simple)?

$
0
0

Actually I am a noobie in web development so what I need was why when I try give the IDas $page.params.ProductId it gives the correct product ID

<script>    import {page} from '$app/stores';    const ID = $page.params.ProductId;</script><h1>   Product : {ID}</h1>

but when I try to give like this

const ID = $page.params;

it gives like [object Object]

but when I give like a nested dynamic routing it is not need to give that Kind of ProductId;?

I am expecting a nice and well answer that concentrates more on example and core.. :)Just need to know about this simple one..since I am doing developing as a Procedure without knowing this kind of this may or may not be usefull in some scenarios


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>