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 // #docregion
export const heroDetail = { export const heroDetail = {
bindings: { bindings: {
hero: '=', hero: '<',
deleted: '&' deleted: '&'
}, },
template: ` template: `

View File

@ -592,6 +592,14 @@ table
td td
:marked :marked
`<my-component (myOutput)="action()">` `<my-component (myOutput)="action()">`
tr
th One-way binding
td
:marked
`myValue: '<myValue'`
td
:marked
`<my-component [myValue]="anExpression">`
tr tr
th Two-way binding th Two-way binding
td td
@ -599,8 +607,9 @@ table
`myValue: '=myValue'` `myValue: '=myValue'`
td td
:marked :marked
As input: `<my-component [myValue]="anExpression">` or As a two-way binding: `<my-component [(myValue)]="anExpression">`.
as 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 :marked
As an example, say we have a hero detail Angular 1 component directive As an example, say we have a hero detail Angular 1 component directive