diff --git a/aio/content/start/index.md b/aio/content/start/index.md index 0205aa35bb..44ae90de71 100644 --- a/aio/content/start/index.md +++ b/aio/content/start/index.md @@ -219,6 +219,13 @@ The Phone XL price is over $700, so the **Notify Me** button appears on that pro To make the **Notify Me** button work, the child component needs to notify and pass the data to the parent component. The `ProductAlertsComponent` needs to emit an event when the user clicks **Notify Me** and the `ProductListComponent` needs to respond to the event. +
+ + In new components, the Angular Generator includes an empty `constructor()`, the `OnInit` interface, and the `ngOnInit()` method. + Since these steps don't use them, the following code examples omit them for brevity. + +
+ 1. In `product-alerts.component.ts`, import `Output` and `EventEmitter` from `@angular/core`. @@ -228,13 +235,6 @@ The `ProductAlertsComponent` needs to emit an event when the user clicks **Notif -
- - In new components, the Angular Generator includes an empty `constructor()`, the `OnInit` interface, and the `ngOnInit()` method. - Since these steps don't use them, the following code example omits them for brevity. - -
- 1. In `product-alerts.component.html`, update the **Notify Me** button with an event binding to call the `notify.emit()` method.