Replies: 1 comment
-
I believe this behavior currently does not work and I am still figuring out the best way to support it. It used to work, but during one of the last major releases I allowed it to regress for technical reasons. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Temple is awesome. I really like it. Thanks.
I want to pass attributes dynamically to a node say div
So i build the attributes as a keyword list like so
attrs = [class: "abc", id: "a1", "data-a1": "ABC", "data-a2": "DEF]
And then I create the div like so
temple do
div attrs do
"Hello World"
end
end
It gives a runtime error that list cannot be converted into string
Please advise if I am doing something wrong.
Additional context
Say you want to create some components and pass attributes dynamically to them. The attributes might not be known beforehand. So the question is how to pass attributes dynamically to nodes.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions