Hi,
I'm looking to conditionally render HTML-encoded values or literal values depending on a javascript property, such as the following:
But all the hash marks reduce readability and are error-prone. What is a better way to handle this?
Thank you.
I'm looking to conditionally render HTML-encoded values or literal values depending on a javascript property, such as the following:
<
script
id
=
"template-cell"
type
=
"text/x-kendo-tmpl"
>
<
td
><
div
class
=
"key-content"
># if (data.encode === true) { # #= data.key # # } else { # #: data.key # # }#</
div
></
td
>
</
script
>
But all the hash marks reduce readability and are error-prone. What is a better way to handle this?
Thank you.