{to-child}
can.view.bindings.toChild
One-way bind a value in the parent scope to the viewModel.
{child-prop}="key"
Imports key in the scope to childProp in viewModel. It also updates
childProp with the value of key when key changes.
<my-component {some-prop}="value"/>
Parameters
-
child-prop
{String}The name of the property to set in the component's viewmodel.
-
key
{Expressions}A KeyLookup or Call expression whose value is used to set as
childProp.
Use
{child-prop}="key"is used to pass values from the scope to a component. You can use CallExpressions like: