new ListItemView(options)
A Backbone.View representing a single Backbone.Model. On render, sets the content of it's element to the
template function called with the model attributes. Also sets a data-id attribute to the id of the model.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
module:js-whatever/js/list-item-view.ListItemView~ListItemViewOptions |
- Source:
Extends
- Backbone.View
Methods
-
<protected> setDataIdAttribute()
-
Sets a data-id attribute on the View's element with the model id as the value
- Source:
Type Definitions
-
ListItemViewOptions
-
- Source:
Properties:
Name Type Argument Default Description modelBackbone.Model The model this view represents
templatefunction Template function used to fill the View's element during render. Passed the model's
attributes as the data property, as well as any templateOptions.templateOptionsobject <optional>
{} Options passed to the template in addition to the model's attributes