开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜