Hi:
I pasted one of your examples into a page (slight modification) as follow:
and it displays on the screen:
#: foo #
I was expecting bar, but it seems it is not binding. I have version v2014.1.318.
Phil
I pasted one of your examples into a page (slight modification) as follow:
<div id=
"app"
></div>
<script>
var
foo = { foo:
"bar"
}
var
view =
new
kendo.View(
'<span>#: foo #</span>'
, { model: foo, evalTemplate:
true
});
view.render($(
"#app"
));
</script>
#: foo #
I was expecting bar, but it seems it is not binding. I have version v2014.1.318.
Phil
5 Answers, 1 is accepted
0
Hello,
The evalTemplate option is a new one, available from the current official release (Q2 2014).
Regards,
Petyo
Telerik
The evalTemplate option is a new one, available from the current official release (Q2 2014).
Regards,
Petyo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Phil H.
Top achievements
Rank 2
answered on 22 Jul 2014, 04:08 PM
Hi Petyo:
I do not think it worked with or without the evalTemplate option. I will upgrade and try.
Phil
I do not think it worked with or without the evalTemplate option. I will upgrade and try.
Phil
0

Phil H.
Top achievements
Rank 2
answered on 22 Jul 2014, 11:05 PM
Hi Petyo:
I tried it with v2014.2.716, it output the same.
It is taken from your web-site. http://docs.telerik.com/kendo-ui/api/framework/view
Phil
I tried it with v2014.2.716, it output the same.
<!DOCTYPE html>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
>
<
title
>View - 01</
title
>
<
script
src
=
"../../scripts/jquery-1.8.2.min.js"
></
script
>
<
link
href
=
"./content/base.css"
rel
=
"stylesheet"
/>
<!-- Common Kendo UI Web CSS -->
<
link
href
=
"../../content/kendo/kendo.common-bootstrap.min.css"
rel
=
"stylesheet"
/>
<!-- Default Kendo UI Web theme CSS -->
<
link
href
=
"../../content/kendo/kendo.blueopal.min.css"
rel
=
"stylesheet"
/>
<!-- jQuery JavaScript -->
<
script
src
=
"../../scripts/jquery-1.8.2.min.js"
></
script
>
<
script
src
=
"../scripts/underscore-min.js"
></
script
>
<!-- Kendo UI Web combined JavaScript -->
<
script
src
=
"../../scripts/kendo/kendo.all.js"
></
script
>
</
head
>
<
body
>
<
div
id
=
"app"
></
div
>
<
script
>
var foo = { foo: "bar" }
var view = new kendo.View('<
span
>#: foo #</
span
>', { model: foo, evalTemplate: true });
view.render($("#app"));
</
script
>
</
body
>
</
html
>
Phil
0
Accepted
Hello Phil,
Apologies for that, the documentation is wrong, and, in fact, showcases that the feature is limited to script templates. We will update it as soon as possible. Meanwhile, check this working example which uses a script template for the view.
Regards,
Petyo
Telerik
Apologies for that, the documentation is wrong, and, in fact, showcases that the feature is limited to script templates. We will update it as soon as possible. Meanwhile, check this working example which uses a script template for the view.
Regards,
Petyo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Phil H.
Top achievements
Rank 2
answered on 25 Jul 2014, 12:59 AM
Hi Petyo:
The following works:
Phil
The following works:
<div id=
"app"
></div>
<script>
var
foo = { foo:
"bar"
}
var
view =
new
kendo.View(
'foo-#: foo #'
, { model: foo, evalTemplate:
true
});
view.render(
"#app"
);
</script>
Phil