Skip to content

Commit

Permalink
Merge branch 'master' into major
Browse files Browse the repository at this point in the history
  • Loading branch information
chasenlehara committed Dec 14, 2017
2 parents 2804be5 + a7b84b9 commit f1ca582
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/value.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

@description Set the value that is returned from the [can-view-import can-import] Promise to a [can-stache-bindings.reference reference scope] variable.

@signature `value:to="*NAME"`
@signature `value:to="scope.vars.NAME"`

Sets up a [can-stache-bindings.toParent] binding to \*NAME in the references scope.
Sets up a [can-stache-bindings.toParent] binding to `scope.vars.NAME` in the references scope.

@param {String} NAME The variable name to assign to the references scope. This can be any string name you want to use, but must be preceded by `*` or it will be placed on the template's View Model.
@param {String} NAME The variable name to assign to the [can-stache/keys/scope/scope.vars 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 templates View Model.

```html
<can-import from="app/person" {^value}="*person" />
<can-import from="app/person" value:to="scope.vars.person" />

<section>
hello {{*person.name}}
hello {{scope.vars.person.name}}
</section>
```

0 comments on commit f1ca582

Please sign in to comment.