ng-xtend API documentation
    Preparing search index...

    Class XtSimpleComponent<T>

    An XtSimpleComponent just displays the given value or element in a form. If you need to dynamically embed other XtComponents to display sub elements, then please use the XtCompositeComponent

    Type Parameters

    • T = any

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    componentNameInForm: Signal<string> = ...

    Returns the component form name, which is for now the subName

    context: InputSignal<XtContext<T>> = ...

    Required input signal providing the XtContext for this component.

    displayValue: Signal<T | null> = ...

    Computed signal exposing the display value from the context.

    formControl: Signal<AbstractControl<any, any, any>> = ...

    Computed signal that retrieves the existing AbstractControl for this component's sub-name.

    formControlName: Signal<string> = ...

    Computed signal returning the form control name for this component.

    formControlNameIfAny: Signal<string | undefined> = ...

    Computed signal returning the form control name, if any.

    formGroup: Signal<FormGroup<any>> = ...

    Computed signal returning the form group, throwing if none exists.

    formGroupIfAny: Signal<FormGroup<any> | undefined> = ...

    Computed signal returning the form group if one exists, or undefined.

    getValue: Signal<T | null | undefined> = ...

    Computed signal exposing the raw value from the context.

    inputsObject: XtBaseInput = ...

    Object holding the base input definitions for this component.

    isInForm: Signal<boolean> = ...

    Computed signal indicating whether this component is inside a reactive form.

    models: InputSignal<XtComponentModel | undefined> = ...

    Input signal accepting model bindings for two-way data flow.

    outputs: OutputEmitterRef<XtComponentOutput> = ...

    Output emitter that publishes the component's output map.

    outputsObject: XtBaseOutput = ...

    Object holding the base output definitions for this component.

    safelyGetSubName: Signal<string> = ...

    Computed signal that safely returns the sub-name, throwing if it is null.

    Methods

    • Manages a form control within the component's form group, optionally creating it if it does not exist. Can be safely called even when no form group is available.

      Type Parameters

      • T

      Parameters

      • ctrlName: string

        The name of the form control

      • create: boolean = true

        Whether to create the control if it does not exist (default true)

      Returns AbstractControl<T, T, any> | undefined

      The AbstractControl, or undefined if no form group is available