Skip to content

Commit 2eecaf1

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

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
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
import {Injector, Type} from '@angular/core';
9+
import {Injector, isSignal, Type} from '@angular/core';
1010
import {Subscription} from 'rxjs';
1111

1212
import {ComponentNgElementStrategyFactory} from './component-factory-strategy';
@@ -240,7 +240,8 @@ export function createCustomElement<P>(
240240
inputs.forEach(({propName, transform}) => {
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() : inputValue;
244245
},
245246
set(newValue: any): void {
246247
this.ngElementStrategy.setInputValue(propName, newValue, transform);

0 commit comments

Comments
 (0)