Skip to content

Commit f667ce0

Browse files
issue chieffancypants#92: Add events to readme
1 parent 4cc49a7 commit f667ce0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,17 @@ cfpLoadingBar.complete()
145145

146146
```
147147

148+
## Events
149+
The loading bar broadcasts the following events over $rootScope allowing further customization:
150+
151+
**`cfpLoadingBar:loading`** triggered upon each XHR request that is not already cached
152+
153+
**`cfpLoadingBar:loaded`** triggered each time an XHR request recieves a response (either successful or error)
154+
155+
**`cfpLoadingBar:started`** triggered once upon the first XHR request. Will trigger again if another request goes out after `cfpLoadingBar:completed` has triggered.
156+
157+
**`cfpLoadingBar:completed`** triggered once when the all XHR requests have returned (either successfully or not)
158+
148159
## Credits:
149160
Credit goes to [rstacruz](https://github.com/rstacruz) for his excellent [nProgress](https://github.com/rstacruz/nprogress).
150161

0 commit comments

Comments
 (0)