79
Backbone.js view.template()
The Backbone.js template method is used to create reusable copies of markup and provides access to instance data. It is a nice convention to define a template function on your views.
Syntax:
Parameter explanation:
data: It specifies the data that is accessed while rendering the view.
Let’s take an example.
See this example: