From 04952541437be6f608c490a9bb535f92da43203a Mon Sep 17 00:00:00 2001 From: Matthieu Riegler Date: Sun, 31 Aug 2025 15:52:44 +0200 Subject: [PATCH] docs: fix hostbinding. (#63509) HostBindings only work on properties and getters. Not methods. fixes #57909 PR Close #63509 --- adev/src/content/guide/components/host-elements.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adev/src/content/guide/components/host-elements.md b/adev/src/content/guide/components/host-elements.md index 8401ed41f1d..b9566e0bdc6 100644 --- a/adev/src/content/guide/components/host-elements.md +++ b/adev/src/content/guide/components/host-elements.md @@ -67,7 +67,7 @@ export class CustomSlider { You can alternatively bind to the host element by applying the `@HostBinding` and `@HostListener` decorator to class members. -`@HostBinding` lets you bind host properties and attributes to properties and methods: +`@HostBinding` lets you bind host properties and attributes to properties and getters: ```angular-ts @Component({ @@ -78,7 +78,7 @@ export class CustomSlider { value: number = 0; @HostBinding('tabIndex') - getTabIndex() { + get tabIndex() { return this.disabled ? -1 : 0; }