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

Tag directives do not work in tables #7

Closed
wardlem opened this issue Jun 27, 2020 · 0 comments · Fixed by #8
Closed

Tag directives do not work in tables #7

wardlem opened this issue Jun 27, 2020 · 0 comments · Fixed by #8
Labels
bug Something isn't working enhancement New feature or request

Comments

@wardlem
Copy link
Owner

wardlem commented Jun 27, 2020

Because of the way that HTML is parsed by the browser, tag directives do not work in tables because the tag is not valid inside a table. An alternative to tag directives is needed, such as declaring a directive as an attribute.

// This doesn't work
<table>
  <tbody>
    <for items="rows" as="row">
      <tr><td>{{row.name}}</td></tr>
    </for>
  </tbody>
</table>
// This would work
<table>
  <tbody>
    <tr directive="for" items="rows" as="row">
      <td>{{row.name}}</td>
    </tr>
  </tbody>
</table>
@wardlem wardlem added bug Something isn't working enhancement New feature or request labels Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant