I want to ask how to do an expression inside the .scala.html file in play framework. You can do the scala codes by puting an @ sign for every scala code. You can also define a variable by:
@defining(0){ i =>
@ i
}
the code above displays 0 but what i want to ask is how can i do an expression on the variable i. for example i want to do:
@i = i + 1
whenever i type this inside the .scala.html file in displays:
0 = i + 1
what i want is i modified after an expression.
THANK YOU.
试试这个表达式:
@i = @{1 + 1}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.