Skip to content

Commit bc3a97c

Browse files
author
Null McNull
committed
dist build
1 parent e5e4c7d commit bc3a97c

File tree

5 files changed

+54
-11
lines changed

5 files changed

+54
-11
lines changed

dist/README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,19 @@ The start method will start the user interface block. Because multiple user inte
8181

8282
**Arguments:**
8383

84-
* **message** (string)
85-
Indicates the message to be shown in the overlay. If none is provided, the default message from the configuration is used.
84+
* **messageOrOptions** | (string or object) | Either supply the message (string) to be show in the overlay or specify an object (see below) that will be merged/extended into the block ui instance state. If no argument is specified the default text message from the configuration is used.
8685

86+
```
87+
blockUI.start('My loading message ...'); // Start the block with the custom text message
88+
```
89+
90+
```
91+
blockUI.start({
92+
message: 'My loading message', // Text message to display
93+
myProperty: 'My value' // Any custom property that should be available in the template.
94+
// See the template configuration for more info.
95+
});
96+
```
8797
#### stop
8898
This will decrease the block count. The block will end if the count is 0.
8999

@@ -178,6 +188,14 @@ Specifies a custom template to use as the overlay.
178188

179189
// Provide a custom template to use
180190
blockUIConfig.template = '<pre><code>{{ state | json }}</code></pre>';
191+
192+
Any custom properties provided to the `start` method of the blockUI instance can be accessed via the `state` object. For example:
193+
194+
// Start a block with custom property values
195+
blockUI.start({ myProperty: 'My value' });
196+
197+
// Display the property value in the custom template.
198+
blockUIConfig.template = '<div>{{ state.myProperty }}</div>';
181199

182200
#### templateUrl
183201
Specifies a url to retrieve the template from. *The current release only works with pre-cached templates, which means that this url should be known in the $templateCache service of Angular. If you're using the grunt with html2js or angular-templates, which I highly recommend, you're already set.*

dist/angular-block-ui.js

Lines changed: 31 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)