# j-AjaxLoading

> This component can show a loading text for async AJAX operations.

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: 0ff86ad42a0da5bebc9f6964eea76d5854e53014125b82f73aab38a876a6ad60
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

This component can show a loading text for async AJAX operations.

- works with `AJAX()` method only

__Configuration__:

- `url {String}` a pattern for URL is evaluated as RegExp, __must be defined__
- `label {String}` optional (default: `HTML content`)
- `icon {Boolean}` adds __spinner__ icon (default: `true`)

Use it with `<ui-component name="ajaxloading">`. When the component is not loaded yet, jComponent downloads it on first use from the address in `DEF.fallback` (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

```html example.html
<div style="width:300px">
	<ui-component name="ajaxloading" config="url:/users/" class="hidden">Loading users</ui-component>
	<br />
</div>

<script>
	setTimeout(function() {
		AJAX('GET /users/');
	}, 2000);
</script>
```
