Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metal Soy Component Breaks When More Than One Html Element Is Present in It's Root #358

Open
kresimir-coko opened this issue Feb 15, 2018 · 3 comments

Comments

@kresimir-coko
Copy link

kresimir-coko commented Feb 15, 2018

{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}
@yuchi
Copy link
Contributor

yuchi commented Feb 16, 2018

Unfortunately this is an issue with Incremental DOM. Not sure if metal can catch and trap the issue.

@kresimir-coko
Copy link
Author

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

@diegonvs
Copy link
Contributor

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants