Skip to content

Using array as data input #78

@lyndametref

Description

@lyndametref

I am using jquery-template to generate layout from data retrieved from a database. In one of the database result, an object is an array and I want to create one html element per item of the array. I have managed to do that with the following code:

<script type="text/html" id="myTemplate">
  <input type="checkbox" data-value=""/>
  <label data-content=""/>
  <br/>
</script>

$("#myDiv").loadTemplate $("#myTemplate"),myArray

Since I haven't seen any documentation about the use of array, I am wondering if this behaviour is intended or it works by chance and might break in future release?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions