Syntax for string[] template attr binding?

5 posts, 1 answers
  1. Steve
    Steve avatar
    1886 posts
    Member since:
    Dec 2008

    Posted 17 Jun 2012 Link to this post

    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>
  2. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 18 Jun 2012 Link to this post

    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!
  3. Steve
    Steve avatar
    1886 posts
    Member since:
    Dec 2008

    Posted 18 Jun 2012 Link to this post

    AH HA, the magical "this"

    Thanks much!
  4. Padhraic
    Padhraic avatar
    2 posts
    Member since:
    Jun 2015

    Posted 30 Mar 2018 Link to this post

    This link is broken
  5. Ivan Danchev
    Admin
    Ivan Danchev avatar
    2063 posts

    Posted 03 Apr 2018 Link to this post

    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.
Back to Top