Thorax patches
Adds Thorax.LayoutViewModel
Adds Thorax.ViewWithLayoutModel (for use by bauplan.layout.controller)
(Both aliased to Bauplan)
Layout view helper
Provides the glue which allows layout views to be inserted declaratively and the contained views to be updated or changed (for instance, simply by navigating to another route)
{{layout view=view options=viewOptions}}
See bauplan.helpers and bauplan.layout.controller for more details
Requires
- lodash
- thorax
- bauplan
- Source:
Members
(private, inner) LayoutViewModels :object
Registry for layout view models
Type:
- object
- Source:
(private, inner) LayoutViews :object
Registry for layout views
Type:
- object
- Source:
(inner) model :object
Type:
- object
- Default Value:
- Thorax.LayoutViewModel
- Source:
Methods
LayoutViewModel(layoutName, optionsopt) → {instance}
Allows layout view models to be referenced and got by name
Changes to the layout view model update the ViewWithLayoutModel it is attached to
Parameters
Name | Type | Attributes | Description |
---|---|---|---|
layoutName |
string | Name of the layout view model |
|
options |
object |
<optional> |
Options to pass to the layout view model |
- Source:
Returns
LayoutViewModel
- Type
- instance
ViewWithLayoutModel(name, optionsopt) → {instance}
Parameters
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | Name of the layout view model |
|
options |
object |
<optional> |
Options to pass to the view used by the ViewWithLayoutModel |
- Source:
Returns
ViewWithLayoutModel
- Type
- instance