Skip to content

Commit 0007d20

Browse files
langxyzxyzmmalerba
authored andcommitted
docs: fix the wrong way to get a signal value (angular#59194)
PR Close angular#59194
1 parent 5bfe637 commit 0007d20

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

adev/src/content/guide/templates/two-way-binding.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ import { Component, model } from '@angular/core';
7474
selector: 'app-counter',
7575
template: `
7676
<button (click)="updateCount(-1)">-</button>
77-
<span>{{ count }}</span>
77+
<span>{{ count() }}</span>
7878
<button (click)="updateCount(+1)">+</button>
7979
`,
8080
})
@@ -89,11 +89,9 @@ export class CounterComponent {
8989

9090
### Enabling two-way binding between components
9191

92-
If we break down the example above to its core , each two-way binding for components requires the following:
92+
If we break down the example above to its core, each two-way binding for components requires the following:
9393

94-
The child component must contain:
95-
96-
1. A `model` property
94+
The child component must contain a `model` property.
9795

9896
Here is a simplified example:
9997

@@ -114,7 +112,7 @@ export class CounterComponent {
114112
The parent component must:
115113

116114
1. Wrap the `model` property name in the two-way binding syntax.
117-
1. Specify the corresponding property to which the updated value is assigned
115+
1. Assign a property or a signal to the `model` property.
118116

119117
Here is a simplified example:
120118

0 commit comments

Comments
 (0)