new exports( [collection] [, options])
Create a new List View (unordered)
Parameters:
Name | Type | Argument | Default | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
collection |
Array.<core#Model> |
<optional> |
[] | The collection of models to render in the list. Defaults to an empty array. |
||||||||
options |
Object |
<optional> |
{} | An optional options hash Properties
|
Extends
- core#View
Members
-
cid :String
-
The client ID (CID) of this model. This property is set automatically when a new model is created.
Type:
- String
-
collection :Array.<core#Model>
-
The collection of models to render in this list.
Type:
- Array.<core#Model>
-
el :HTMLULElement
-
A reference to the
<ul>
for the current list, if renderedType:
- HTMLULElement
-
el :HTMLElement
-
A reference to the HTML element for this view
Type:
- HTMLElement
-
template :function
-
The templating function for rendering each item in the list. Should return a
<li>
as either an HTML string or an HTML element. Make sure the template function is bound to its original context to retain any encapsulated variables.Type:
- function