1

I'm using Kendo's templates and am trying to assign the literal contents of my object's "value" field to a javascript variable. Example of what I'm trying to do is given below:

# var a = (#= data.value #) #

I keep getting an invalid template error.. is this possible to do with Kendo's templates?

Thank you

4

2 回答 2

3

只需使用

# var a = data.value #
//and later you will have it available 
#if(a=="foo"){#
//...
#}#

你应该明白了。

于 2013-02-22T06:20:40.190 回答
0

请像下面这样使用。您应该能够在 Kendo 模板中获取 JavaScript 值。

#var a = data.value #

不要忘记标记为答案!

于 2013-02-27T05:28:52.433 回答