Views are used to reflect "how your data model looks like". They represent the model's data to the user. They provide the idea behind the presentation of the model's data to the user. It handles the user input events, binds events and methods, renders model or collection and interacts with the user.
The following table lists down the methods which can be used to manipulate the BackboneJS-Views.
|S.No.||Methods & Description|
It extends the Backbone.View class to create a custom view class.
It instantiates the view by using the new keyword.
It defines which element to be used as the view reference.
It represents the jQuery object for the view's element.
It specifies the existing DOM element to a different DOM element.
They can be used as DOM element attributes on the view class.
It is used as a selector that contains the $ function and runs queries within the view's element.
While rendering the view, template creates reusable copies of markup and provides access to instance data.
It contains the logic for rendering a template.
Removes a view from the DOM.
Binds elements to the specified DOM elements with callback methods to handle events.
It removes delegate events from the view.