How to use partial templates with map in StringTemplate?
I've got a map of city names => distance-from-origin.
I'd like to开发者_运维技巧 use a partial with this map, and create something like so:
<ul>
<li>city1: distance1</li>
<li>city2: distance2</li>
<li>city3: distance3</li>
</ul>
What is the canonical way to do this with StringTemplate?
Thanks.
<ul>
$amap.keys:{k | <li>$k$: $amap.(k)$</li>}$
</ul>
精彩评论