Thymeleaf error, for handling button,input tags


#1

I am using thymeleaf with ember framework, but its not identifying, thymeleaf tags, such as button,input and gives an error as button is not closed.

  <button {{action 'doneEditing'}}>Done</button>.

#2

I had a similar problem where I had to implement the following:

<script type="text/x-handlebars" data-template-name="requests">
    <ul>
        <li {{bind-attr class="isFailure:failure"}}>
        </li>
    </ul>
</script>

I ended up rewriting this as:

<script type="text/x-handlebars" data-template-name="requests" th:inline="text">
    <ul th:with="open='&lt;li  {{bind-attr class=\'isFailure:failure\'}}&gt;',close='&lt;/li&gt;'">
        [[${open}]]
        [[${close}]]
    </ul>
</script>

taking advantage of ThymeLeaf’s inlining capabilities.

I agree that this workaround is a pain in a large application where similar code has to be written multiple times. I will open an issue for the ThymeLeaf team to suggest if this can be fixed within ThymeLeaf somehow.