The first span will print foo. However, the second one won't print bar because it's within a script tag. As far as angular goes, I have to use script of type text/ng-template for these inline templates, and it seems that as far as Thymeleaf goes, I can't use th:* attributes within a script tag.
P.S. I am aware that it's perhaps the best practice to fetch any data for angular templates using angular itself, but I'd like to minimize requests to the server and simplify my code by pre-rendering some stuff.