Skip to main content

showLoadingIndicator

showLoadingIndicator

Shows a loading indicator over this form's area.

Parameters

  • timeoutSeconds (number): The auto-hide timeout in seconds. Passing 0 applies the default of 20 seconds

Returns: None (void)

Description

Calls loaderOverlay.show() directly, bound to the current form's contextKey (the form's own BuildContext). The indicator appears only within that form's area.

warning

No reference counting. Calling showLoadingIndicator several times doesn't stack a counter, and a single hideLoadingIndicator call hides it immediately. Use $app.showLoadingIndicator when you need nested calls.

$form vs $app in detail

$form.showLoadingIndicator$app.showLoadingIndicator
CoverageThat form's area onlyThe whole app (root overlay)
Reference counting❌ None✅ Yes (supports nested calls)
Default timeout (when passing 0)20 seconds10 seconds
Hide behaviorHides immediatelyHides only when refCount reaches 0
Shown above dialogs and sheetsOnly within the form's boundsAbove every overlay

When to use $form

  • To show that only one form's area is loading
  • When other forms must stay usable
  • For a simple one-off request with no nested calls

When to use $app

  • When the whole app must be blocked (sign-in, global initialization)
  • When several async requests may nest and nothing should hide until all finish
  • When multiple calls such as $http requests overlap and show/hide counts need to match

Example

// 단순 폼 로딩
$form.showLoadingIndicator(10);

$http.get("/api/data", function(res) {
$form.hideLoadingIndicator();
$log.i("데이터:", res.data);
});

Related

  • $form.hideLoadingIndicator() — hides the form's loading indicator
  • $app.showLoadingIndicator(timeoutSeconds) — app-wide loading indicator (with reference counting)