A question rather than an issue per se.
I am trying to write a template that will create either a 'div' or 'span' element and then populate it with markup.
I have worked around the issue by testing the element name and creating the node and contents but am looking for a better way.
Pseudo-code (current):
` if containerNode == "div"
...
if containerNode == "span"
<span data-bind="attr: ...">...</span>`
What I'd like to do is:
<ko createElementNode: "div"> ...Not sure how to specify the bindings that would apply to the node created in createElementNode.... </ko>
A question rather than an issue per se. I am trying to write a template that will create either a 'div' or 'span' element and then populate it with markup. I have worked around the issue by testing the element name and creating the node and contents but am looking for a better way.
Pseudo-code (current): ` if containerNode == "div"
What I'd like to do is:
<ko createElementNode: "div"> ...Not sure how to specify the bindings that would apply to the node created in createElementNode.... </ko>
Thanks!