Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. template() {
  2. return [
  3. ["div",
  4. ["header"
  5. ["h1", "Example " + this.title]
  6. ]
  7. ],
  8. ['div#main',
  9. $.if(this.todos.length > 0, [
  10. ['div',
  11. ['span.counter', "There are " + this.todos.length + " todos!"]
  12. ]
  13. ])
  14. ],
  15. ['ul.todos',
  16. $.forEach(this.todos, (todo, index) => [
  17. ['li.todo',
  18. ['h2', "A todo"],
  19. ['span', index + ": " + todo]
  20. ]
  21. ])
  22. ],
  23. ['form', {id: them.formId, method: "post", action. "#"},
  24. ['div.form-control', [
  25. ['input', {name: "first_name", type: "text"}]
  26. ],
  27. ['button', {type: "submit", onClick: this.click},
  28. "Submit!"
  29. ]
  30. ]
  31. ]
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement