クラス IgxToastComponent

Ignite UI for Angular Toast - ヘルプ

Ignite UI Toast は、ユーザーが閉じられない非対話型の情報や報告メッセージを表示できます。 Toast はページの下側、中央、または上側に表示できます。 例:

<button (click)="toast.show()">Show notification</button>
<igx-toast #toast
          message="Notification displayed"
          displayTime="1000">
</igx-toast>

階層

  • IgxToastComponent

実装

コンストラクタ

プロパティ

アクセサー

メソッド

Object literals

コンストラクタ

constructor

プロパティ

autoHide

autoHide: boolean = true

toast が displayTime の終了後に非表示になるかどうかを取得または設定します。 デフォルト値は true です。

<igx-toast [autoHide] = "false"></igx-toast>
let autoHide = this.toast.autoHide;
次のメンバー:

IgxToastComponent

displayTime

displayTime: number = 4000

表示された後、toast が表示される期間 (ミリ行) を取得または設定します。 デフォルト値は 4000 です。

<igx-toast [displayTime] = "2500"></igx-toast>
let displayTime = this.toast.displayTime;
次のメンバー:

IgxToastComponent

id

id: string = `igx-toast-${NEXT_ID++}`

toast の id を取得または設定します。 設定されない場合、id の値は "igx-toast-0" になります。

<igx-toast id = "my-first-toast"></igx-toast>
let toastId = this.toast.id;

message

message: string

toast に表示されるメッセージを取得または設定します。

<igx-toast [message] = "Notification"></igx-toast>
let toastMessage = this.toast.message;
次のメンバー:

IgxToastComponent

onHidden

onHidden: EventEmitter<IgxToastComponent> = new EventEmitter<IgxToastComponent>()

Toast が非表示にされたときにイベントを発生します。 イベント引数として IgxToastComponent への参照を提供します。

<igx-toast (onHidden) = "onHidden($event)"></igx-toast>
次のメンバー:

IgxToastComponent

onHiding

onHiding: EventEmitter<IgxToastComponent> = new EventEmitter<IgxToastComponent>()

Toast が非表示される前にイベントを発生します。 イベント引数として IgxToastComponent への参照を提供します。

<igx-toast (onHiding) = "onHiding($event)"></igx-toast>
次のメンバー:

IgxToastComponent

onShowing

onShowing: EventEmitter<IgxToastComponent> = new EventEmitter<IgxToastComponent>()

Toast が表示される前にイベントを発生します。 イベント引数として IgxToastComponent への参照を提供します。

<igx-toast (onShowing) = "onShowing($event)"></igx-toast>
次のメンバー:

IgxToastComponent

onShown

onShown: EventEmitter<IgxToastComponent> = new EventEmitter<IgxToastComponent>()

Toast が表示されたときにイベントを発生します。 イベント引数として IgxToastComponent への参照を提供します。

<igx-toast (onShown) = "onShown($event)"></igx-toast>
次のメンバー:

IgxToastComponent

position

position: IgxToastPosition = IgxToastPosition.Bottom

toast の位置を取得または設定します。 設定されない場合、position 属性の値は IgxToastPosition.Bottom です。

<igx-toast [position] = "top"></igx-toast>
let toastPosition = this.toast.position;
次のメンバー:

IgxToastComponent

role

role: string = "alert"

role 属性を取得または設定します。 設定されない場合、role の値は "alert" です。

<igx-toast [role] = "'notify'"></igx-toast>
let toastRole = this.toast.role;
次のメンバー:

IgxToastComponent

アクセサー

element

  • get element(): any
  • toast の nativeElement を取得します。

    let nativeElement = this.toast.element;
    次のメンバー:

    IgxToastComponent

    返却 any

isVisible

  • get isVisible(): boolean
  • set isVisible(value: boolean): void
  • toast の表示状態を有効または無効にします。 設定されない場合、isVisible の値は false です。

    <igx-toast [isVisible] = "true"></igx-toast>
    let isVisible = this.toast.isVisible;

    双方向データ バインディング。

    <igx-toast [(isVisible)] = "model.isVisible"></igx-toast>
    次のメンバー:

    IgxToastComponent

    返却 boolean

  • toast の表示状態を有効または無効にします。 設定されない場合、isVisible の値は false です。

    <igx-toast [isVisible] = "true"></igx-toast>
    let isVisible = this.toast.isVisible;

    双方向データ バインディング。

    <igx-toast [(isVisible)] = "model.isVisible"></igx-toast>

    パラメーター

    • value: boolean

    返却 void

メソッド

hide

  • hide(): void

mapPositionToClassName

  • mapPositionToClassName(): any
  • position 値に基づいて toast のクラス名を取得または設定します。

    let className =  this.toast.mapPositionToClassName();
    次のメンバー:

    IgxToastComponent

    返却 any

show

  • show(): void
  • toast を表示します。 autoHide が有効な場合、toast は displayTime 終了後に非表示になります。

    this.toast.show();
    次のメンバー:

    IgxToastComponent

    返却 void

toggle

  • toggle(): void
  • toast の表示状態を切り替えます。

    this.toast.toggle();
    次のメンバー:

    IgxToastComponent

    返却 void

Object literals

CSS_CLASSES

CSS_CLASSES: object

Returns a list of available CSS classes.

let toastClasses =  this.toast.CSS_CLASSES;
memberof

IgxToastComponent

IGX_TOAST_BOTTOM

IGX_TOAST_BOTTOM: string = "igx-toast--bottom"

IGX_TOAST_MIDDLE

IGX_TOAST_MIDDLE: string = "igx-toast--middle"

IGX_TOAST_TOP

IGX_TOAST_TOP: string = "igx-toast--top"