-
I saw this tweet: What is the new cool thing? I don't know Maizzle all that well. |
Beta Was this translation helpful? Give feedback.
Answered by
cossssmin
Mar 4, 2022
Replies: 1 comment 2 replies
-
You can pass data through attributes to a component. In that screenshot, Might not be the best example since I used Here's a simpler component example: <!-- button.html -->
<a href="{{ url }}">
{{ label }}
</a> If you'd use that like this: <component
src="button.html"
url="https://example.com"
label="Click me"
></component> ... it would compile to: <a href="https://example.com">
Click me
</a> |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
weenzeel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can pass data through attributes to a component.
In that screenshot,
article
inside<component ... role="article">
is passed into the component, compilingrole="{{ role }}"
torole="article"
.Might not be the best example since I used
article
for the component file name as well (article.html
).Here's a simpler component example:
If you'd use that like this:
... it would compile to: