code: function configureScopeAndTransitions(options) {
            options = options || { };
            if (options.template) {
              options.template = $mdUtil.processTemplate(options.template);
            }
  
            return angular.extend({
              preserveScope: false,
              cancelAutoHide : angular.noop,
              scope: options.scope || $rootScope.$new(options.isolateScope),
  
              /**
               * Default usage to enable $animate to transition-in; can be easily overridden via 'options'
               */
              onShow: function transitionIn(scope, element, options) {
                return $animate.enter(element, options.parent);
              },
  
              /**
               * Default usage to enable $animate to transition-out; can be easily overridden via 'options'
               */
              onRemove: function transitionOut(scope, element) {
                // Element could be undefined if a new element is shown before
                // the old one finishes compiling.
                return element && $animate.leave(element) || $q.when();
              }
            }, options);
  
          }
docs: Prepare optional isolated scope and prepare $animate with default enter and leave
  transitions for the new element instance.