クラス IgxRadioGroupDirective

Ignite UI for Angular Radio Group - ヘルプ

Ignite UI Radio Group を使用すると、隣に表示されるオプションのセットから単一のオプションを選択する機能を提供します。 例:

<igx-radio-group name="radioGroup">
  <igx-radio *ngFor="let item of ['Foo', 'Bar', 'Baz']" value="{{item}}">
     {{item}}
  </igx-radio>
</igx-radio-group>

階層

  • IgxRadioGroupDirective

実装

  • AfterContentInit
  • ControlValueAccessor
  • OnDestroy

プロパティ

change

change: EventEmitter<IChangeRadioEventArgs> = new EventEmitter<IChangeRadioEventArgs>()

ラジオ グループの value が変更された後に発生するイベント。 イベント引数として選択した IgxRadioComponent および value プロパティへの参照を提供します。

次のメンバー:

IgxRadioGroupDirective

radioButtons

radioButtons: QueryList<IgxRadioComponent>

子ラジオ ボタンへの参照を返します。

let radioButtons =  this.radioGroup.radioButtons;
次のメンバー:

IgxRadioGroupDirective

アクセサー

disabled

  • get disabled(): boolean
  • set disabled(newValue: boolean): void
  • ラジオ グループの無効化を許可する @Input プロパティ。デフォルトで false です。

    <igx-radio-group [disabled]="true"></igx-radio-group>
    次のメンバー:

    IgxRadioGroupDirective

    返却 boolean

  • ラジオ グループの無効化を許可する @Input プロパティ。デフォルトで false です。

    <igx-radio-group [disabled]="true"></igx-radio-group>

    パラメーター

    • newValue: boolean

    返却 void

labelPosition

  • 子ラジオ ボタンの label の位置を取得または設定します。 設定されない場合、labelPosition の値は "after" です。

    <igx-radio-group labelPosition = "before"></igx-radio-group>
    let labelPosition =  this.radioGroup.labelPosition;
    次のメンバー:

    IgxRadioGroupDirective

    返却 RadioLabelPosition | string

  • 子ラジオ ボタンの label の位置を取得または設定します。 設定されない場合、labelPosition の値は "after" です。

    <igx-radio-group labelPosition = "before"></igx-radio-group>
    let labelPosition =  this.radioGroup.labelPosition;

    パラメーター

    返却 void

name

  • get name(): string
  • set name(newValue: string): void
  • ラジオ グループ コンポーネントの name 属性を取得または設定します。すべての子ラジオ ボタンはこの名前を継承します。

    <igx-radio-group name = "Radio1"></igx-radio-group>
    let name =  this.radioGroup.name;
    次のメンバー:

    IgxRadioGroupDirective

    返却 string

  • ラジオ グループ コンポーネントの name 属性を取得または設定します。すべての子ラジオ ボタンはこの名前を継承します。

    <igx-radio-group name = "Radio1"></igx-radio-group>
    let name =  this.radioGroup.name;

    パラメーター

    • newValue: string

    返却 void

required

  • get required(): boolean
  • set required(newValue: boolean): void
  • ラジオ グループが必須かどうかを取得または設定します。 設定されない場合、required の値は false です。

    <igx-radio-group [required] = "true"></igx-radio-group>
    let isRequired =  this.radioGroup.required;
    次のメンバー:

    IgxRadioGroupDirective

    返却 boolean

  • ラジオ グループが必須かどうかを取得または設定します。 設定されない場合、required の値は false です。

    <igx-radio-group [required] = "true"></igx-radio-group>
    let isRequired =  this.radioGroup.required;

    パラメーター

    • newValue: boolean

    返却 void

selected

value

  • get value(): any
  • set value(newValue: any): void
  • value 属性を取得または設定します。

    <igx-radio-group [value] = "'radioButtonValue'"></igx-radio-group>
    let value =  this.radioGroup.value;
    次のメンバー:

    IgxRadioGroupDirective

    返却 any

  • value 属性を取得または設定します。

    <igx-radio-group [value] = "'radioButtonValue'"></igx-radio-group>
    let value =  this.radioGroup.value;

    パラメーター

    • newValue: any

    返却 void

メソッド

ngAfterContentInit

  • ngAfterContentInit(): void

writeValue

  • writeValue(value: any): void
  • 提供された値が現在のラジオ ボタンと一貫性のあるかどうかを確認します。 一貫性がある場合、checked 属性の値は true になり、selected プロパティは選択した IgxRadioComponent を含みます。

    this.radioGroup.writeValue('radioButtonValue');

    パラメーター

    • value: any

    返却 void