开发者

Template formatting

I'm trying to figure out how I can format a value with jquery templates.

One of the values is a bool 开发者_运维百科which I would like to convert to a string. I tried:

{IsVisible?'x':'-'}

which didn't work. How can I do it?


That should work fine (provided it's prefixed with a $):

${IsVisible ? 'x' : '-'}

Working Demo.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜