docs(upgrade): cover Angular 1.5 one-way data bindings

closes #1090, 1169
This commit is contained in:
Tero Parviainen 2016-04-25 12:09:37 +03:00 committed by Ward Bell
parent 66984d5fc8
commit 0ae32e7adb
2 changed files with 12 additions and 3 deletions

View File

@ -1,7 +1,7 @@
// #docregion
export const heroDetail = {
bindings: {
hero: '=',
hero: '<',
deleted: '&'
},
template: `

View File

@ -592,6 +592,14 @@ table
td
:marked
`<my-component (myOutput)="action()">`
tr
th One-way binding
td
:marked
`myValue: '<myValue'`
td
:marked
`<my-component [myValue]="anExpression">`
tr
th Two-way binding
td
@ -599,8 +607,9 @@ table
`myValue: '=myValue'`
td
:marked
As input: `<my-component [myValue]="anExpression">` or
as two-way binding: `<my-component [(myValue)]="anExpression"`
As a two-way binding: `<my-component [(myValue)]="anExpression">`.
Since most Angular 1 two-way bindings actually only need a one-way binding
in practice, `<my-component [myValue]="anExpression">` is often enough.
:marked
As an example, say we have a hero detail Angular 1 component directive