docs(upgrade): cover Angular 1.5 one-way data bindings
closes #1090, 1169
This commit is contained in:
parent
66984d5fc8
commit
0ae32e7adb
|
@ -1,7 +1,7 @@
|
|||
// #docregion
|
||||
export const heroDetail = {
|
||||
bindings: {
|
||||
hero: '=',
|
||||
hero: '<',
|
||||
deleted: '&'
|
||||
},
|
||||
template: `
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue