@vismaux/ngx-nordic-cool
Version:
Common Nordic-Cool components for Angular.
51 lines (50 loc) • 2.15 kB
TypeScript
import { Provider, ChangeDetectorRef, EventEmitter } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import * as i0 from "@angular/core";
/**
* Provider Expression that allows nc-radio-group to register as a ControlValueAccessor.
* This allows it to support [(ngModel)] and ngControl.
*/
export declare const RADIO_CONTROL_VALUE_ACCESSOR: Provider;
export declare class NcRadioGroupComponent implements ControlValueAccessor {
private cdRef;
private _uniqueId;
private _onTouched;
private _onModelChanged;
private _disabled;
private _value?;
/** Name of the radio button group. All radio buttons inside this group will use this name. */
name: string;
/**
* Value for the radio-group. Should equal the value of the selected radio button if there is
* a corresponding radio button with a matching value. If there is not such a corresponding
* radio button, this value persists to be applied in case a new radio button is added with a
* matching value.
*/
get value(): string;
set value(value: string);
/** Whether the radio group is disabled */
get disabled(): boolean;
set disabled(value: boolean);
/**
* Event emitted when the group value changes.
* Change events are only emitted when the value changes due to user interaction with
* a radio button (the same behavior as `<input type="radio">`).
*/
valueChange: EventEmitter<string>;
constructor(cdRef: ChangeDetectorRef);
/** @ignore */
registerOnChange(fn: (value: any) => void): void;
/** @ignore */
registerOnTouched(fn: any): void;
/** @ignore */
writeValue(value: any): void;
/** @ignore */
setDisabledState(isDisabled: boolean): void;
/** @ignore */
onValueChange(value: string): void;
/** @ignore */
onBlur(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NcRadioGroupComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NcRadioGroupComponent, "nc-radio-group", never, { "name": "name"; "value": "value"; "disabled": "disabled"; }, { "valueChange": "valueChange"; }, never, ["*"]>;
}