value:to
Set the value that is returned from the can-import Promise to a [can-stache-bindings.reference reference scope] variable.
value:to="scope.vars.NAME"
Sets up a key:to binding to scope.vars.NAME
in the references scope.
Parameters
- NAME
{String}
:The variable name to assign to the references scope. This can be any string name you want to use, but must be preceded by
scope.vars.
or it will be placed on the template’s View Model.<can-import from="app/person" value:to="scope.vars.person" /> <section> hello {{scope.vars.person.name}} </section>