PaulGuo / Juicer

A Lightweight JavaScript Template Engine.
http://juicer.name
MIT License
915 stars 262 forks source link

如果在jsp中是用的话,${} 会被当做el表达式优先编译 #121

Open yunxiaoit00 opened 7 years ago

yunxiaoit00 commented 7 years ago

请问现在有什么办法处理吗

mycoin commented 7 years ago
juicer.set({
    'tag::operationOpen': '{%',
    'tag::operationClose': '%}',
    'tag::interpolateOpen': '{{',
    'tag::interpolateClose': '}}',
    'tag::noneencodeOpen': '{{=',
    'tag::noneencodeClose': '}}',
    'tag::commentOpen': '{#',
    'tag::commentClose': '}',

    'errorhandling': false,
    'strip': false
});

表达式 {{item.userName}} 或者 {{=item.userName}}

操作符 {%if (item.isActive === "true")%} xxx {{%/if%}}