Reputation: 715
Is something like this possible in Svelte?
<CustomElement props={ {akey: `value`, bkey: `value`} }></CustomElement>
I know I can pass the object if I have defined it in the script, but some components I just need to send a couple static properties.
Upvotes: 0
Views: 668
Reputation: 184376
In Svelte files this is possible.
In HTML with components compiled to custom elements this probably will not work, as all HTML attributes are strings.
Upvotes: 1