Javatpoint Logo
Javatpoint Logo

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:

Test it Now

Output:

Save the above code in template.html file and open this file in a new browser.

BackboneJS template Model
Next TopicBackbone.js Render





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA