开发者

What is the server side comment tag in scala templates in play framework?

I need to comment my code server side ( not rendered to client) in 开发者_如何学Goscala templates in play framework. What is the format of this tag?


The documentation does not explicitly say, but as the template engine is inspired by ASP.net Razor, I would guess it uses the same syntax, which is

@* comment here *@

Note the end comment is done with a closing @ symbol.


This works:

@{ /* Comment */ }

But I was hoping something even better (requiring less typing) is out there.


@* comment *@ works in play framework version 2


These two are working for scala-0.9.1 (on play framework):

@{ /* comment */ }

@{ // comment
}

But these not:

@{ // comment }
@* comment *@

Still, there's a lot of typing :(

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜