开发者

How to use partial templates with map in StringTemplate?

开发者 https://www.devze.com 2023-01-30 05:09 出处:网络
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:

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消