BackboneJS - View Initialize - Backbone.js

Description

It instantiates the view by using the new keyword and gets called when the view is first created.

Syntax

Parameters

  • options − These are optional parameters which can be model, collection, el, id, className, tagName, attributes and events.

Example

Output

Let us carry out the following steps to see how the above code works −

  • Save the above code in the initialize.htm file.
  • Open this HTML file in a browser.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Backbone.js Topics