Skip to content

Commit 25d9f04

Browse files
committed
Improve example
1 parent 1cfdcba commit 25d9f04

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

docs/content/docs/provider/eventBusProvider.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: >
88

99
Instance of [PubSubProvider](../../../typedoc/classes/PubSubProvider.html) for
1010
configuring the `$eventBus` service. The default implementation returns the
11-
global `angular.EventBus` instance, which is an async instance of
11+
global [angular.EventBus](../../../typedoc/classes/Angular.html#eventbus) instance, which is an async instance of
1212
[PubSub](../../../typedoc/classes/PubSub.html) class.
1313

1414
### Properties
@@ -25,9 +25,14 @@ Customize event bus instance.
2525
- **Example:**
2626

2727
```js
28-
angular.module('demo', []).config(($eventBusProvider) => {
29-
eventBusProvider.eventBus = new MyCustomPubsub();
30-
});
28+
angular.module('demo', [])
29+
.config([
30+
"$eventBusProvider",
31+
/** @param {ng.PubSubProvider} $eventBusProvider */
32+
($eventBusProvider) => {
33+
eventBusProvider.eventBus = new MyCustomPubsub();
34+
}
35+
]);
3136
```
3237

3338
---

0 commit comments

Comments
 (0)