Skip to content

Commit c63c5ac

Browse files
fix(elements): return value on signal input getter
closes angular#62097
1 parent 3a0cfd5 commit c63c5ac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/elements/src/create-custom-element.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,11 @@ export function createCustomElement<P>(
237237
}
238238

239239
// Add getters and setters to the prototype for each property input.
240-
inputs.forEach(({propName, transform}) => {
240+
inputs.forEach(({propName, transform, isSignal}) => {
241241
Object.defineProperty(NgElementImpl.prototype, propName, {
242242
get(): any {
243-
return this.ngElementStrategy.getInputValue(propName);
243+
const inputValue = this.ngElementStrategy.getInputValue(propName);
244+
return isSignal ? inputValue() : inputValue;
244245
},
245246
set(newValue: any): void {
246247
this.ngElementStrategy.setInputValue(propName, newValue, transform);

0 commit comments

Comments
 (0)