core/dynamic-forms/radio/radio.type.component.ts
FieldType
changeDetection | ChangeDetectionStrategy.OnPush |
selector | c8y-field-radio |
templateUrl | ./radio.type.component.html |
Properties |
|
Static Readonly CONFIG |
Type : ConfigOption
|
Default value : {
types: [
{
name: 'radio',
component: FieldRadio,
wrappers: ['c8y-form-field']
}
]
}
|
defaultOptions |
Type : object
|
Default value : {
templateOptions: {
options: [],
formCheck: 'custom' // 'custom' | 'custom-inline' | 'stacked' | 'inline'
}
}
|
<label
*ngFor="let option of to.options | formlySelectOptions: field | async; let i = index"
[title]="option.label"
class="c8y-radio"
>
<input
type="radio"
[id]="id + '_' + i"
[name]="field.name || id"
[attr.value]="option.value"
[value]="option.value"
[formControl]="formControl"
[formlyAttributes]="field"
[attr.disabled]="option.disabled || formControl.disabled ? true : null"
/>
<span></span>
<span>{{ option.label | humanize }}</span>
</label>