Skip to content

Commit 6468a2b

Browse files
tomer953pkozlowski-opensource
authored andcommitted
docs: add signal example for "Binding to the host element" section (angular#57272)
Added a new example demonstrating the use of signals in the "Binding to the host element" section. PR Close angular#57272
1 parent d30cef2 commit 6468a2b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

adev/src/content/guide/components/host-elements.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,15 @@ the `host` property in the `@Component` decorator:
4747
host: {
4848
'role': 'slider',
4949
'[attr.aria-valuenow]': 'value',
50+
'[class.active]': 'isActive()',
5051
'[tabIndex]': 'disabled ? -1 : 0',
5152
'(keydown)': 'updateValue($event)',
5253
},
5354
})
5455
export class CustomSlider {
5556
value: number = 0;
5657
disabled: boolean = false;
57-
58+
isActive = signal(false);
5859
updateValue(event: KeyboardEvent) { /* ... */ }
5960
6061
/* ... */

0 commit comments

Comments
 (0)