From 8555016eece8b8d123369e6cda74d1011fed9d82 Mon Sep 17 00:00:00 2001 From: Vincent Guo Date: Mon, 13 May 2019 11:57:55 +0800 Subject: [PATCH] docs: fix the payload in event-binding sample code (#30429) after reading the context. there are some clues to infer the payload should be the `item`, not `item.name`. 1. EventEmitter. 2. the desc say that: The component defines a deleteRequest property that returns an EventEmitter. When the user clicks delete, the component invokes the delete() method, telling the EventEmitter to emit an **Item** object. PR Close #30429 --- .../event-binding/src/app/item-detail/item-detail.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/examples/event-binding/src/app/item-detail/item-detail.component.ts b/aio/content/examples/event-binding/src/app/item-detail/item-detail.component.ts index 94ea032ce3..b05b901f6d 100644 --- a/aio/content/examples/event-binding/src/app/item-detail/item-detail.component.ts +++ b/aio/content/examples/event-binding/src/app/item-detail/item-detail.component.ts @@ -21,7 +21,7 @@ export class ItemDetailComponent { @Output() deleteRequest = new EventEmitter(); delete() { - this.deleteRequest.emit(this.item.name); + this.deleteRequest.emit(this.item); this.displayNone = this.displayNone ? '' : 'none'; this.lineThrough = this.lineThrough ? '' : 'line-through'; }