"${" here as you are already in FreeMarker-expression-mode

freemaker 的错误解决

不能使用“$ {”在这里你已经在 freemaker 的表达方式里面了

意思就是,你这个 表达式 被 freemaker 的表达式 给包围了,所以此处的表达式不需要些 ${}

符号了。

0down vote

Change <#assign a = ${annoCorrente}> to <#assign a = annoCorrente>

(or you can do <#assign a = "${annoCorrente}"> but this is not recommended)

 将${} 去掉即可。

比如:

 <#list  myplanppScoreList.planeeMyList as  planeeMy>
           <div class="border_dotted marginTop_15 padding_15">
              <!-- 工作目标 -->
             <div style="margin-left: 25px;">
                 <h4>${planeeMy.hepplaneePo.title}</h4>              
                <p><h5>类别:
                            <#assign ptype = planeeMy.hepplaneePo.type>
                            <#if (ptype==1)>OKR  
                            <#else> 重点工作  </#if>  

 

不需要 改为  <#assign ptype = ${planeeMy.hepplaneePo.type}> 的否则会报错的

一般是被 list 或者是 #if 给包围了,那么在 这些里面 再写 比如 #if 表达式 就不需要 将后台的获取的数据 使用 ${}来表示了。

 

  1. <#if condition>…  
  2. <#elseif condition>…  
  3. <#elseif condition>…  
  4. <#else> …  
  5. </#if>  
  6.   
  7. 例子如下:  
  8. <#assign age=23>  
  9. <#if (age>60)>老年人  
  10. <#elseif (age>40)>中年人  
  11. <#elseif (age>20)>青年人  
  12. <#else> 少年人  
  13. </#if>  
  14.  

 

转载于:https://my.oschina.net/ouminzy/blog/803379

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值