alert service

// show loading
loadingService.show();

// hide loading
loadingService.hide();

// hide loading after 2 seconds
loadingService.hide(2000);
loadingService.actionName(timeout);
name arguments notes
show
hide timeout=[number] default timeout is 200 milliseconds

You should manually hide loading after you call show method. The hide method has a default 200 milliseconds timeout that you can overwrite by passing a number to it.