Skip to main content
edited tags
Link
yglodt
  • 14.4k
  • 15
  • 98
  • 135
Source Link
yglodt
  • 14.4k
  • 15
  • 98
  • 135

Thymeleaf forEach loop in JavaScript

I am migrating a project from JSP to Thymeleaf.

In some JSPs I did fancy stuff like this:

<script type="text/javascript">
    //<c:forEach items="${pages}" var="page">

    ...
    var l = new google.maps.LatLng("${page.lat}", "${page.long}");
    ...

    //</c:forEach>
</script>

How could I do the same with Thymeleaf?