scala模板报错

可是代码里面明明没有一点问题
<div class="content-top-right banner-r-img">
<ul>
@for ( i<- banners){
<li data-color="@p.getBgColor()">
<a href="@p.getRelatedInterfaceUrl()" target="_blank">
)
</a>
</li>
}
</ul>
<ol>
</ol>
<span id="content-top-right-span">
<a href="" class="bor-b-d">
<img src="" alt=""/>
</a>
<a href="">
<img alt=""/>
</a>
</span>
</div>
光看着提示的话,我就在循环里面找错误,小心翼翼地找了很久,怎么调都还是提示 “'(' expected but ')' found.”的错误,最后把之前写好的for循环拷过来,发现是因为
@for ( i<- banners){
必须是@for后紧跟着一个括号(,并不是后面提到的for循环里面的问题,如:
@for( i<- banners){
这样写,就是对的;然而,我浪费的时间谁还给我?靠靠靠~这提示,为什么还有人说scala好用呢?
网友评论