Alloy.Widget
Widgets are self-contained components that can be easily dropped into an Alloy project.
Widgets are self-contained components that can be easily dropped into an Alloy project. They were conceived as a way to reuse code in multiple projects or to be used multiple times in the same project.
Methods #
createCollection #
Factory method for instantiating a Backbone collection of model objects.
Parameters:
| Name | Type | Summary | Optional |
|---|---|---|---|
name | String | No | |
args | Object | Yes |
Returns: Backbone.Collection — Backbone collection object.
createController #
Factory method for instantiating a controller.
Parameters:
| Name | Type | Summary | Optional |
|---|---|---|---|
name | String | No | |
args | Object | Yes |
Returns: Object — Alloy controller object.
createModel #
Factory method for instantiating a Backbone Model object.
Parameters:
| Name | Type | Summary | Optional |
|---|---|---|---|
name | String | No | |
args | Object | Yes |
Returns: Backbone.Model — Backbone model object.
createWidget #
Factory method for instantiating a widget controller.
Parameters:
| Name | Type | Summary | Optional |
|---|---|---|---|
id | String | No | |
name | String | Yes | |
args | Object | Yes |
Returns: Object — Alloy widget controller object.