Skip to content

Commit

Permalink
add some html interpolations
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanLiu0235 committed Feb 9, 2018
1 parent 46b1e2c commit c63f70e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/listview/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
var tpl = 'Now I repeat: ' +
'<ul>' +
'<% for (var i = 0; i < 20; i++) { %>' +
'<li><%= i %>: I am Leopard!</li>' +
'<li><%= i %>: I am <%- name %>!</li>' +
'<% } %>' +
'</ul>'
var html = Leopard(tpl)

var data = {
name: '<em>Leopard</em>'
}
var html = Leopard(tpl, data)
document.getElementById('app').innerHTML = html

</script>
Expand Down

0 comments on commit c63f70e

Please sign in to comment.