Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Backbone Router Notes

Each route is a  unique view.
And you attach that view's template onto some # place.
When views initialize, they this.execute() or use their execute function
Access the html /content of the view using this.template
This.execute IS necessary for routes...in the intialize function, you execute this.execute(). Do not directly use this.$el.html(this.template) in initialize.
And at Execute, we use this.$el.html(this.template) to add our HTML to our view
 
PREVIOUS NEXT
Tagged: #Backbone #Router #Notes
ADD COMMENT
Topic
Name
2+9 =