diff --git a/packages/core/src/metadata/directives.ts b/packages/core/src/metadata/directives.ts index e29149856a..08646edc27 100644 --- a/packages/core/src/metadata/directives.ts +++ b/packages/core/src/metadata/directives.ts @@ -872,6 +872,29 @@ export interface HostListener { * template: '', * }) * class App {} + * + * ``` + * + * The following example registers another DOM event handler that listens for key-press events. + * ``` ts + * import { HostListener, Component } from "@angular/core"; + * + * @Component({ + * selector: 'app', + * template: `