From 13d82ce248ae65a214df5b1596ce4a4ba99e65ce Mon Sep 17 00:00:00 2001 From: abarghoud Date: Fri, 5 Feb 2021 11:49:41 +0100 Subject: [PATCH] docs(core): add documentation for HostListener (#40720) add return value documentations for HostListener callbacks Closes #40708 PR Close #40720 --- packages/core/src/metadata/directives.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/core/src/metadata/directives.ts b/packages/core/src/metadata/directives.ts index b69dc9624e..660b1d72d7 100644 --- a/packages/core/src/metadata/directives.ts +++ b/packages/core/src/metadata/directives.ts @@ -823,6 +823,11 @@ export interface HostListenerDecorator { /** * Decorator that declares a DOM event to listen for, * and provides a handler method to run when that event occurs. + * + * Angular invokes the supplied handler method when the host element emits the specified event, + * and updates the bound element with the result. + * + * If the handler method returns false, applies `preventDefault` on the bound element. */ (eventName: string, args?: string[]): any; new(eventName: string, args?: string[]): any;