ion-app
AppはIonicアプリケーションのコンテナ要素です。1つのプロジェクトにつき<ion-app>要素は1つだけです。アプリはメニュー、ヘッダー、コンテンツ、フッターなど多くのIonicコンポーネントを持つことができます。オーバーレイコンポーネントは表示時に <ion-app> に追加されます。
ion-appを使用すると、以下の動作が可能になります。
- キーボードライフサイクルイベント は、ネイティブプラグインを必要なくなります。
- Android 端末のハードウェアバックボタンの動作をカスタマイズするための Hardware Back Button Listeners を使えます
- Capacitor や Cordova でステータスバーをサポートし、ステータスバーをタップすることでビューの最上部にスクロールできるようになります。
- テキスト入力が画面上のキーボードにかからないように、コンテンツをスクロールさせるスクロールアシストユーティリティが使えます。
- Material Design モードでのボタン操作時のRipple effect が使えます。
- Ionicアプリの使用感をよりネイティブなものにする、その他のタップやフォーカスのユーティリティが使えます。
プログラムによるフォーカス
Ionicは、ion-focusableクラスを持つコンポーネント用のフォーカスユーティリティを提供します。これらのユーティリティは、Tabなどの特定のキーボードキーが押されたときに、コンポーネントのフォーカスを自動的に管理します。コンポーネントは、ion-appのsetFocusメソッドを使用して、ユーザーのアクションに応じてプログラムでフォーカスを設定することもできます。
プロパティ
No properties available for this component.
イベント
No events available for this component.
メソッド
setFocus
| Description | Used to set focus on an element that uses ion-focusable. Do not use this if focusing the element as a result of a keyboard event as the focus utility should handle this for us. This method should be used when we want to programmatically focus an element as a result of another user action. (Ex: We focus the first element inside of a popover when the user presents it, but the popover is not always presented as a result of keyboard action.) |
| Signature | setFocus(elements: HTMLElement[]) => Promise<void> |
| Parameters | elements: An array of HTML elements to set focus on. |
CSS Shadow Parts
No CSS shadow parts available for this component.
CSSカスタムプロパティ
No CSS custom properties available for this component.
Slots
No slots available for this component.