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
|
// #docregion
|
||||||
export const heroDetail = {
|
export const heroDetail = {
|
||||||
bindings: {
|
bindings: {
|
||||||
hero: '=',
|
hero: '<',
|
||||||
deleted: '&'
|
deleted: '&'
|
||||||
},
|
},
|
||||||
template: `
|
template: `
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue