Hey guys, I am trying to use conditionals in my template and it keeps blowing up (Invalid template error). Here is what I have
Here's the data:
var data = { type: 'success', message: 'A new contact was created!'};
Here's the template:
<
script
id
=
"alert-template"
type
=
"text/x-kendo-template"
>
# if (type == 'success'){ #
<
div
class
=
'alert-message success'
>
<
a
class
=
"close"
href
=
""
>x</
a
>
<
p
>
#= message #
</
p
>
</
div
>
# } elseif (type == 'error'){ #
<
div
class
=
'alert-message error'
>
<
a
class
=
"close"
href
=
""
>x</
a
>
<
p
>
#= message #
</
p
>
</
div
>
# } #
</
script
>
Any help would be greatly appreciated! Thanks!