1

am a newbie to angularJS and Thymeleaf and am experiencing some weird conflict.

This is what I have below

   <input type="text" th:field="*{unit}" value="{{unit.unitID}}" class="unit_value"/>

Whenever the template is resolved and displayed in the browser, the value is set to empty as in something like this

<input class="unit_value" type="text" value="" id="unit" name="unit" />

am not having the angularJS expression in the value anymore.

I know the expression is synonymous to that of thymeleaf, I really dont know how to solve this.

I have searched everywhere but cant get a solution.

2
  • in angular if u want to bind that value with a scope variable ,u can make use of ng-bind="unit.unitID" Commented Mar 25, 2015 at 13:00
  • Are you biding a server side value (thymeleaf) or a client side value (angular)? Commented Sep 25, 2015 at 15:07

1 Answer 1

1

The Solution I found is to literally bind the tag yourself and releave thymeleaf from binding it that is just put in the expected generated html that thymeleaf will generate

  <input type="text" name="unit" value="{{unit.unitID}}" class="unit_value"/>

And everything works fine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.