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

Syntax for string[] template attr binding?

4 Answers 222 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 18 Jun 2012, 02:21 AM
If I just have a simple array of strings in a property, how do you access that in the bound template seeing as there's no object to bind properties to?

Example:
<ul id="results" data-template="item-template" data-bind="images">
 
</ul>

<script id="item-template" type="text/x-kendo-template">
    <li><img data-bind="attr: {src: ??? }" /></li>
</script>

4 Answers, 1 is accepted

Sort by
0
Accepted
Iliana Dyankova
Telerik team
answered on 18 Jun 2012, 07:34 AM
Hello Steve,

Please check this topic from our online documentation - it discusses the binding to array of primitive types.

 

Greetings,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 18 Jun 2012, 12:58 PM
AH HA, the magical "this"

Thanks much!
0
Padhraic
Top achievements
Rank 1
answered on 30 Mar 2018, 05:38 AM
This link is broken
0
Ivan Danchev
Telerik team
answered on 03 Apr 2018, 05:54 AM
Hello,

Here's a working link to the mentioned section of the documentation.

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
MVVM
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Iliana Dyankova
Telerik team
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Padhraic
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or