src/core/services/interimElement/interimElement.js
function waitForInterim(callbackFn) {
        return function() {
          var fnArguments = arguments;

          if (!showingInterims.length) {
            // When there are still interim's opening, then wait for the first interim element to
            // finish its open animation.
            if (showPromises.length) {
              return showPromises[0].finally(function () {
                return callbackFn.apply(service, fnArguments);
              });
            }

            return $q.when("No interim elements currently showing up.");
          }

          return callbackFn.apply(service, fnArguments);
        };
      }
function waitForInterim(callbackFn) {
        return function() {
          var fnArguments = arguments;

          if (!showingInterims.length) {
            // When there are still interim's opening, then wait for the first interim element to
            // finish its open animation.
            if (showPromises.length) {
              return showPromises[0].finally(function () {
                return callbackFn.apply(service, fnArguments);
              });
            }

            return $q.when("No interim elements currently showing up.");
          }

          return callbackFn.apply(service, fnArguments);
        };
      }
function waitForInterim ( callbackFn ) { return function ( ) { var fnArguments = arguments ; if ( ! showingInterims . length ) { // When there are still interim's opening, then wait for the first interim element to // finish its open animation. if ( showPromises . length ) { return showPromises [ 0 ] . finally ( function ( ) { return callbackFn . apply ( service , fnArguments ) ; } ) ; } return $q . when ( "No interim elements currently showing up." ) ; } return callbackFn . apply ( service , fnArguments ) ; } ; }
Creates a function to wait for at least one interim element to be available.
@param callbackFn Function to be used as callback
@returns {Function}
Creates a function to wait for at least one interim element to be available .