Skip to content

Commit

Permalink
docs(readme): Added isActive documentation (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuuurt13 committed Mar 11, 2018
1 parent dd85481 commit de97fa7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,22 +274,25 @@ Angular has a specific syntax for passing properties to structural directives. P
```
## NgBlockUI Instance
Below highlights all the methods that can be found on a BlockUI instance when a class property is decorated with the `@BlockUI()` decorator.
Below highlights all the properties that can be found on a BlockUI instance when a class property is decorated with the `@BlockUI()` decorator.
| Method | Description |
| Property | Description |
|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `name` | Name of the targeted instance (defaults to main instance). |
| `isActive` | Indicates if the targeted instance is blocking. |
| `start` | Starts blocking for instance, can be passed an optional message. |
| `stop` | Stops blocking for instance. |
| `reset` | Stops blocking for all currently blocking instances app wide regardless of the `delayStop` option. |
| `update` | Updates current instances blocking message with the passed message. |
| `unsubscribe` | Unsubscribe an instance so it no longer can be blocked. All BlockUI components/directives unsubscribe during the `onDestroy` lifecycle hook. In some cases | it might be desirable to unsubscribe while the component/element is still in the view.
| `unsubscribe` | Unsubscribe an instance so it no longer can be blocked. All BlockUI components/directives unsubscribe by default during `onDestroy` |
## BlockUIService
In some cases you may want to have more control over all the instances in you app.
Instead of declaring seperate instances with the `@BlockUI()` decorator you can use the `BlockUIService`. This service allows you to easily target multiple instance across your app.
| Method | Parameters | Description |
|---------------|------------------------------------------------------------|------------------------------------------------------------------------------------------|
| `isActive` | <code>target: string &#124; string[]</code> | Indicates if the targeted instance(s) is blocking. |
| `start` | <code>target: string &#124; string[], message?: any</code> | Starts blocking for a single instance or multiple instances by passing instance name(s). |
| `stop` | <code>target: string &#124; string[]</code> | Stops blocking for a single instance or multiple instances by passing instance name(s). |
| `unsubscribe` | <code>target: string &#124; string[]</code> | Unsubscribes a single instance or multiple instances by passing instance name(s). |
Expand Down

0 comments on commit de97fa7

Please sign in to comment.