Skip to content

Commit

Permalink
Add custom tag example
Browse files Browse the repository at this point in the history
Fixes #7
  • Loading branch information
trojanh authored Sep 18, 2020
1 parent 47f8b0f commit 8d3030d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ console.log('===========================')
console.log(Eta.compile(template, Eta.defaultConfig).toString())
console.log('===========================')
console.log(Eta.render(template, { value: '<img>Something</img>' }))

var customTagTemplate = `<label>First Name: {{=it.firstName}}</label>`
console.log(Eta.render(x, { firstName: "ABC" }, { tags: ["{{", "}}"]}))

0 comments on commit 8d3030d

Please sign in to comment.