Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Backbone Template

-the content of your template view is what is inside the <script id> </script> 
- this.$el.html(this.template(this.model.toJSON()) this line is what is setting the value of each individual view/template's html. Without it.
-For example. If you instead wrote this.$el.html("hello world") , each element would just be "hello world".
- <input class="edit" value="<%- title %>"> is the this.input=    this.input = this.$('.edit');
 
PREVIOUS NEXT
Tagged: #Backbone #Template
ADD COMMENT
Topic
Name
7+9 =