How to print @ symbol in HTML with play framework (scala)

*爱你&永不变心* 提交于 2019-12-04 20:10:18

问题


I am new to Scala and play 2.1 and I come from a PHP background. I am not able to print the @ symbol in HTML. I am getting the following error:

not found: value Hotmail

Here is my code:

myname<label>@Hotmail.com</label>

Please let me know how I can print the @symbol.

Thanks in advance.


回答1:


Double it:

myname<label>@@Hotmail.com</label>

It's called escape syntax. Other rules for play template framework can be found here




回答2:


You can also write HTML Entity code &#64 for printing @ symbol in your view file.



来源:https://stackoverflow.com/questions/19157571/how-to-print-symbol-in-html-with-play-framework-scala

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!