hideLoadingIndicator
アプリ全体のローディングインジケーターのオーバーレイを非表示にします。リファレンスカウント方式で動作します。
Parameters
なし
Returns
なし(void)
Description
_indicatorRefCountを1減らし、カウンターが0になったときだけ実際にオーバーレイを非表示にします。$app.showLoadingIndicatorをN回呼び出した場合、hideLoadingIndicatorもN回呼び出さないとインジケーターは消えません。
$app vs $formの詳細比較
| 区分 | $app.hideLoadingIndicator | $form.hideLoadingIndicator |
|---|---|---|
| 非表示の範囲 | アプリ全体(ルートオーバーレイ) | 該当フォームの領域のみ |
| リファレンスカウント | ✅ あり — refCountが0のときだけ非表示 | ❌ なし — 即座に非表示 |
| 入れ子でshow2回のあとhide1回 | カウンターが1減り、まだ表示中 | 即座に消える |
Example
// 基本的な使い方
$app.showLoadingIndicator(0);
$http.get("/api/data", function(res) {
$app.hideLoadingIndicator(); // refCount 0 → 非表示
$log.i("완료:", res.data);
});
// 入れ子呼び出し — show2回 → hide2回が必要
$app.showLoadingIndicator(0); // refCount: 1
$app.showLoadingIndicator(0); // refCount: 2
$app.hideLoadingIndicator(); // refCount: 1、まだ表示中
$app.hideLoadingIndicator(); // refCount: 0、これで非表示
Related
$app.showLoadingIndicator(timeoutSeconds)— アプリのローディングインジケーターを表示(リファレンスカウント)$form.hideLoadingIndicator()— フォーム領域のインジケーターを非表示(即座、カウントなし)