jgauffin
jgauffin

Reputation: 101192

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?

Upvotes: 0

Views: 172

Answers (1)

Town
Town

Reputation: 14906

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

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

Working Demo.

Upvotes: 2

Related Questions