Options
inherits: can.view.Scope
Create a helper lookup node for keys. Options are where mustache helpers, partials, local tags, and other non-data objects are found.
new can.view.Options(options, [parent]) 2.1
Parameters
-
options
{Object}
An object with at least one of the following properties:
helpers
- Mustache helpers will be found within this object.partials
- Mustache partials will be found within this object.tags
- Local tag hookups will be found within this object.
If none of these properties are found, the object is assumed to be a helpers object.s
-
parent
{can.view.Options}
OptionalThe parent options object. If a
key
value is not found in the current options object, it will then look in the parent scope.
Returns
{can.view.Options}
Returns a options instance.
Use
can.view.Options
is rarely used directly. However, they are indirectly created in several places:helpers
argument of can.viewhelpers
argument.And
can.view.Options
are provided several places:options
property.options
property.options
property.Options works just like can.view.Scope except it contains references to local non-data values like:
When a mustache template is rendered, these can be specified like:
If no
helpers
,partials
ortags
properties are found, options are assumed to be helpers. The following would pass a loalisSelected
to "people.mustache":