riot-js

Open full view…

Custom Tag as Placeholder?

ulim
Tue, 12 Sep 2017 12:44:55 GMT

Hi all, I'm just starting out with Riot. I've defined a custom tag like so: <contacts> ... a table with contacts </contacts> In the final output the <contacts> tag is still present, but it doesn't actually do anything (well, in fact it messes up my CSS definitions :-) So I'd like the <contacts> root tag to act like a placeholder, it should be replaced with whatever is inside it in the final DOM and thus not be rendered to the user. Is that possible?

majklovec
Sat, 23 Sep 2017 22:31:26 GMT

Use <virtual data-is="contact"> instead of <contacts>

ulim
Sun, 24 Sep 2017 15:22:09 GMT

I tried that, but it didn't work. Neither in the custom tag definition, nor when it was used.