It seems that you posted this as a question to the kendo UI support as well. For the sake of convenience for others reading this post I'm reposting the answer:
All the html inside of the template is being evaluated - after all it becomes string. ($('#templateId').html() is used) and these comments are also taken into account. Simply do not add such commented expressions (because they still work) and no exceptions will appear.
Do you enjoy Icenium? Vote for it as your favorite new product here (use short code H048S).
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.