From e5b179f4daac3af7d3ac527c6a9223e6899f8c86 Mon Sep 17 00:00:00 2001 From: Barry Rowe Date: Mon, 2 Oct 2017 13:39:46 -0400 Subject: [PATCH] Update documentation to clarify "a busy thing" It turns out that using a configuration object, you can set the `busy` property to a boolean to start/stop the indicator, but the documentation wasn't clear on this. This clarifies that as an option, and provides an example of using an `async` piped boolean value into the `busy` property. --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0748f63..33b6c6f 100644 --- a/README.md +++ b/README.md @@ -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:
``` -## Options +```html + +
+``` + +## 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 above, 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. |