Skip to content
@ng-doc/app / Class

NgDocTypeAliasControlComponent

The playground control of union type aliases and enums: a select that shows the value (or the name of an enum member) and whether it is the default. The inspector shows the value type under the input's name.

Decorators
@Component
Selectors
ng-doc-type-alias-control
Generic types
T
Extends
DIControl<T, T>
Implements
NgDocTypeControl<T>
DeclarationTypeScript
@Component({ … })
export class NgDocTypeAliasControlComponent<T>
  extends DIControl<T>
  implements NgDocTypeControl<T> { … }

Members

Constructor

1
()
—

Properties

14
change: (value: T | null) => void
protected inherited from DIControlValueAccessor
—
changeDetectorRef: ChangeDetectorRef
protectedreadonly inherited from DIControlValueAccessor
—
config?: DIControlConfig<TModel, TChildModel> | undefined
protectedreadonly inherited from DIControl
—
default: InputSignal<T | undefined>
readonly input() implements NgDocTypeControl

Default value of the input; clearing the selection returns to it.

disabledValue: WritableSignal<boolean>
protectedreadonly inherited from DIControlValueAccessor
—
elementRef: ElementRef<HTMLElement>
protectedreadonly inherited from DIControlValueAccessor
—
incomingUpdate?: ((value: T | null) => void) | undefined
protectedreadonly inherited from DIControlValueAccessor
—
isManual: InputSignal<boolean | undefined>
readonly input() implements NgDocTypeControl

Whether options are values the user listed in the playground config.

protectedreadonly

The options of the select. undefined and null get no option: clearing the selection returns to the default value instead.

model: Signal<T | null>
protectedreadonly inherited from DIControlValueAccessor
—
ngControl: NgControl | null
protectedreadonly inherited from DIControlValueAccessor
—
options: InputSignal<(string | NgDocPlaygroundOption)[] | undefined>
readonly input() implements NgDocTypeControl

Values the input accepts: literal source text, plain values when isManual is set, or the names and values of enum members.

renderer: Renderer2
protectedreadonly inherited from DIControlValueAccessor
—
touch: () => void
protected inherited from DIControl

Function that should be used to make control touched.

Accessors

3
get disabled: boolean
inherited from DIControlValueAccessor

Returns true if the control is disabled.

set disabled: boolean
inherited from DIControlValueAccessor
—
get hasValue: boolean
inherited from DIControlValueAccessor

Returns true if the control is not empty.

Methods

8
(…): boolean
protected

Whether the reset button is shown: a value other than the default is selected.

(…): void
—
(…): string

The text of a value: the name of its option, such as the name of an enum member.

(): void
inherited from DIControl
—
(…): void
inherited from DIControl

Method is called by the forms API.

(…): string
—
(…): void
inherited from DIControl

Updates the model of the current control. This is the main method that should be used to update the model.

(…): void
inherited from DIControl

Method is called by the forms API to write to the view when programmatic changes from model to view are requested.

Symbol
Kind
Class
Decorators
@Component
Selectors
ng-doc-type-alias-control
Generic types
T
Extends
DIControl<T, T>
Implements
NgDocTypeControl<T>
Scope
@ng-doc/app
Edit this page