This is a migrated thread and some comments may be shown as answers.

Nested template in external script

1 Answer 70 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 24 Sep 2013, 04:55 PM
If this is my template defined in my script
var coreTemplate: "<div id='favouritesTooltipContent'>\
                   <h2>Favourites</h2>\
                   <ul data-bind='source: items' data-template=''>\
                   </ul>\
                </div>",
...is there a way that the "data-template" for that URL could also live in the script instead of in the page??

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 26 Sep 2013, 08:05 AM
Hello Steve,

I am afraid that what you would like to achieve is not supported. The data-template attribute accepts only string that represents the name (id) of the template. It is not possible to define an in-line template using this attribute.

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
MVVM
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Alexander Valchev
Telerik team
Share this question
or