code: function showElement(element, options, controller) {
            // Trigger onShowing callback before the `show()` starts
            var notifyShowing = options.onShowing || angular.noop;
            // Trigger onComplete callback when the `show()` finishes
            var notifyComplete = options.onComplete || angular.noop;
  
            // Necessary for consistency between AngularJS 1.5 and 1.6.
            try {
              notifyShowing(options.scope, element, options, controller);
            } catch (e) {
              return $q.reject(e);
            }
  
            return $q(function (resolve, reject) {
              try {
                // Start transitionIn
                $q.when(options.onShow(options.scope, element, options, controller))
                  .then(function () {
                    notifyComplete(options.scope, element, options);
                    startAutoHide();
  
                    resolve(element);
                  }, reject);
  
              } catch (e) {
                reject(e.message);
              }
            });
          }
docs: Show the element ( with transitions), notify complete and start
  optional auto-Hide