Skip to content

Commit

Permalink
docs(API): update @input decorator docs for interpolation binding
Browse files Browse the repository at this point in the history
  • Loading branch information
Hotell committed Apr 10, 2016
1 parent 52e2d1f commit 465af32
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,8 @@ Note:
An alternative and more declarative way to using the `inputs` property on `@Component`/`@Directive`.
Binds to Component via two way binding `=` by default or via one way binding on Directive by default.
Since 1.5 it allows you to bind to an interpolation which was previously handled by `@Attr` via `@Input('@')`
If you wanna use one way binding on Component use `@Input('<') yourProperty`
*Example:*
Expand All @@ -798,10 +800,11 @@ class MenuDropdown {
@Input() options;
@Input('<') oneWay;
@Input('aliasMe') value;
@Input('@') interpolatedValue: string;
}
```
```html
<menu-dropdown one-way="ctrl.someValue" options="ctrl.options" alias-me="ctrl.foo"></menu-dropdown>
<menu-dropdown one-way="ctrl.someValue" options="ctrl.options" alias-me="ctrl.foo" interpolated-value="{{ $ctrl.someValToInterpolate }}"></menu-dropdown>
```
###### Parameters
Expand Down Expand Up @@ -849,6 +852,8 @@ class MenuDropdown {

> **module:** `ng-metadata/core`

**DEPRECATED** will be removed in 2.0. Instead use `@Input('@)`

An alternative and more declarative way to using the `attrs` property on `@Component`/`@Directive`.

Binds to controller via `@` binding or observes attirbute on directive via `$attrs.observe` and sets $ctrl instance
Expand Down

0 comments on commit 465af32

Please sign in to comment.