...
LoadingService is an Angular Factory in the Layer module, implemented by loading.js
. It provides an API to start and stop a "Loading..." animation in the center of the window.
Warning |
---|
This code is soon to be refactored (ONOS-3747) to include delayed start functionality. |
Name | Summary |
---|---|
start | Starts the animation |
stop | Stops the animation |
waiting | Returns true if start() has been called but stop() has not |
Function Descriptions
start
Starts the "Loading..." animation after a 500ms delay.
(This function is idempotent.)
Example Usage | Arguments | Return Value |
---|---|---|
loadingls.start(); | none | none |
stop
Stops Cancels the delayed start task and stops the "Loading..." animation.
(This function is idempotent.)
Example Usage | Arguments | Return Value |
---|---|---|
loadingls.stop(); | none | none |
waiting
Returns true if start()
has been called and stop()
has not.
Example Usage | Arguments | Return Value | none |
---|
...
if (ls.waiting()) ... | none | true, if waiting to be stopped; false otherwise |