Skip to content

Update documentation to clarify "a busy thing" #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -94,7 +94,8 @@ The `ngBusy` directive expects a ***busy thing***, which means:
- A promise
- Or an Observable's subscription
- Or an array of them
- Or a configuration object
- Or a configuration object
- Using a configuration object, you can make use of a boolean for the `busy` property of the config

In other words, you may use flexible syntax:

@@ -113,11 +114,16 @@ In other words, you may use flexible syntax:
<div [ngBusy]="{busy: busy, message: 'Loading...', backdrop: false, delay: 200, minDuration: 600}"></div>
```

## Options
```html
<!-- Advanced syntax w/ async Piped boolean value -->
<div [ngBusy]="{busy: (myCurrentState$ | async).isLoading, message: 'Loading Current Data...', backdrop: true, delay: 100, minDuration: 400}"></div>
```

## Configuration Object Options

| Option | Required | Default | Details |
| ---- | ---- | ---- | ---- |
| busy | Required | null | A busy thing (or an array of busy things) that will cause the loading indicator to show. |
| busy | Required | null | A busy thing (or an array of busy things), as described <a href="#directive-syntax">above</a>, that will cause the loading indicator to show. |
| message | Optional | 'Please wait...' | The message to show in the indicator which will reflect the updated values as they are changed. |
| backdrop | Optional | true | A faded backdrop will be shown behind the indicator if true. |
| template | Optional | A default template string | If provided, the custom template will be shown in place of the default indicatory template. The scope can be augmented with a `{{message}}` field containing the indicator message text. |