这是一个创建于 4329 天前的主题,其中的信息可能已经有所发展或是发生改变。
已经取得变量{{app.photos}}=AAA|BBB|CCC
例如:AAA|BBB|CCC
输出:
<li>AAA</li>
<li>BBB</li>
<li>CCC</li>
2 条回复 • 1970-01-01 08:00:00 +08:00
|
|
1
Brutal 2012-11-28 17:58:54 +08:00
在 controller 里 app.photos = app.photos.split('|') 然后再在 template 里操作
|
|
|
2
kenneth 2012-11-29 00:10:02 +08:00
@ Brutal 确实是在控制器里先split以后,模板再用for循环。谢谢。
|