Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Backbone View

this.$el this accesses the element itself
this.model this access the data: it could have been a single model:song or a collection model:songs
songView and songsView are both legit views. songview is about a single li when it renders (and what to do with its model data) and songsViews is what to do with each of these songView (using each() function) when it renders
 
PREVIOUS NEXT
Tagged: #Backbone #View
ADD COMMENT
Topic
Name
8+7 =