You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The template element is used to declare fragments of HTML that can be cloned and inserted in the document by script.
In a rendering, the template element represents nothing.
The text was updated successfully, but these errors were encountered:
Duplicate of #2080. <template slot='foo'> is one of the syntaxes that was proposed in that ticket.
ALso slot as a prop name was specifically disallowed so that sometime in the future that last syntax could be added without it being a breaking change.
Hi there,
Why svelte doesn't support
template
tag?I wanted to use them for avoiding extra markup with slots.
Please look to examples above,
With extra markup:
With template tag for avoid extra markup:
Without extra markup, but with error
'slot' is reserved for future use in named slots
REPL https://svelte.dev/repl/8ad8f71a5f5c48039d6be62e88ad07f8?version=3.5.1
By whatwg spec
The text was updated successfully, but these errors were encountered: