Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit a1e63c8

Browse files
machineloopNarretz
authored andcommitted
docs(guide/Components): clarify output events with extra example and note
Add additional line from example which demonstrates using the snake cased attribute binding in parent component template. Add note clarifying camelCase to snake-case requirement to use the Output binding callback feature. Closes #14365
1 parent 8cc9978 commit a1e63c8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/content/guide/component.ngdoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ components should follow a few simple conventions:
133133
For a deletion, that means the component doesn't delete the `hero` itself, but sends it back to
134134
the owner component via the correct event.
135135
```html
136+
<!-- not that we use snake case for bindings in the template as usual -->
137+
<editable-field on-update="$ctrl.update('location', value)"></editable-field><br>
136138
<button ng-click="$ctrl.onDelete({hero: $ctrl.hero})">Delete</button>
137139
```
138140
- That way, the parent component can decide what to do with the event (e.g. delete an item or update the properties)

0 commit comments

Comments
 (0)