Replies: 2 comments 2 replies
-
Can you check if it works with a self closing tag? Like I'm currently not on a device where I could try it out myself. |
Beta Was this translation helpful? Give feedback.
-
All of the following examples result in a print of Note
Template Layout (non-self-closing)e.g. <main>
<tmpl txt='Foo'></tmpl>
</main>
<div @name="tmpl">
<script>
constructor({ txt }) {
console.log(txt) // txt: "Foo"
}
</script>
</div>
Template Layout (self-closing)e.g. <main>
<tmpl txt='Foo' />
</main>
<div @name="tmpl">
<script>
constructor({ txt }) {
console.log(txt)
}
</script>
</div>
Using as md tag / extensione.g. <div @name="tmpl">
<script>
constructor({ txt }) {
console.log(txt)
}
</script>
</div>
[tmpl txt="Foo"] If it still doesn't log for you, please open a bug report issue with a minimal reproduction |
Beta Was this translation helpful? Give feedback.
-
I can not pass data to template component constructor when using it in layout.
If I use it in md file it works fine.
Does anyone have solution to this?
Beta Was this translation helpful? Give feedback.
All reactions