Created
September 30, 2013 20:59
-
-
Save Pierry/6770175 to your computer and use it in GitHub Desktop.
Criar lista dinâmica com a Kendo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id='main'></div> | |
<!-- Add External Template Here --> | |
<script id="jsTmpl" type="text/x-kendo-template"> | |
<h4>Awesome Dudes</h4> | |
<ul> | |
# for (var i = 0, len = data.length; i < len; i++){ # | |
<li>#= data[i] #</li> | |
# } # | |
</ul> | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add Template code here | |
var template = kendo.template($('#jsTmpl').html()); | |
var data = [ "Brandon", "Todd", "John", "Burke" ]; | |
var processed = template(data); | |
$("#main").append(processed); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment