Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

 

 

NameSummary
startStarts the animation
stopStops the animation
waitingReturns 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 UsageArgumentsReturn Value
loadingls.start();nonenone

 

stop

Stops Cancels the delayed start task and stops the "Loading..." animation.

(This function is idempotent.)

Example UsageArgumentsReturn Value
loadingls.stop();nonenone

waiting

Returns true if start() has been called and stop() has not.

Example UsageArgumentsReturn Valuenone

...

if (ls.waiting()) ...nonetrue, if waiting to be stopped; false otherwise