metal.js
metal.js copied to clipboard
Metal Soy Component Breaks When More Than One Html Element Is Present in It's Root
{template .render}
<label>
<input>
{/template}
The example above will cause issues while the one below won't.
It should be documented (and it would be awesome if there would be a compile error) that trying to render a template with more than 1 HTML element in its root isn't intended.
{template .render}
<div class="container">
<label>
<input>
</div>
{/template}
Unfortunately this is an issue with Incremental DOM. Not sure if metal can catch and trap the issue.
We should at least have it documented somewhere, perhaps https://github.com/liferay/soy-cheat-sheet or https://github.com/jbalsas/liferay-metal-soy-guidelines
Hey @kresimir-coko , the repos that you are shown is outdated. We're now working with the following documentation: https://hosting-liferayfrontendguidelines.wedeploy.io/soy/