【发布时间】:2012-07-15 14:20:27
【问题描述】:
我尝试在 HTML 标记中的 Rythm 中编写 While 循环,但我不能
类似这样的代码:
@{
int i = 0;
while( i< 5){
i++;
}
<h2>hello</h2>
@{
}
}
【问题讨论】:
标签: java template-engine templating rythm
我尝试在 HTML 标记中的 Rythm 中编写 While 循环,但我不能
类似这样的代码:
@{
int i = 0;
while( i< 5){
i++;
}
<h2>hello</h2>
@{
}
}
【问题讨论】:
标签: java template-engine templating rythm
目前Rythm不支持while循环。使用 for 循环代替您的情况:
@for(int i = 0; i < 5; ++i) {
<h2>hello</h2>
}
【讨论】: