项目中用到freemarker中不想用太多的[#if] [#else] [/#if]运算想到三目运算符,但和java中用法不一样
如下:
1、${(item.id == channelId)?string('class="active"','')}
项目中用到freemarker中不想用太多的[#if] [#else] [/#if]运算想到三目运算符,但和java中用法不一样
如下:
1、${(item.id == channelId)?string('class="active"','')}