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.
精彩评论