Skip to content

Angular: signal-based inputs not working #2950

Open
@E4RIJMP

Description

@E4RIJMP

Hello,

There is an option to pass input fields in an NgGridStackWidget:

export interface NgGridStackWidget extends GridStackWidget {
    /** Angular tag selector for this component to create at runtime */
    selector?: string;
    /** serialized data for the component input fields */
    input?: NgCompInputs;
    /** nested grid options */
    subGridOpts?: NgGridStackOptions;
}

This data however can only be access by using the @Input decorator. A signal-based approach does not work.
According to the documentation binding should be same:

Binding to an input is the same in both signal-based and decorator-based inputs:

<custom-slider [value]="50" />

But using something like value = input<number>(); if value was passed via input of NgGridStackWidget will result in value being a number rather than a signal. So, trying to access the value as a signal (e.g. The slider's value is ${this.value()}) will result in an error.

Regards

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions