code: function showMenu() {
          opts.parent.append(element);
          element[0].style.display = '';
  
          return $q(function(resolve) {
            var position = calculateMenuPosition(element, opts);
  
            element.removeClass('md-leave');
  
            // Animate the menu scaling, and opacity [from its position origin (default == top-left)]
            // to normal scale.
            $animateCss(element, {
              addClass: 'md-active',
              from: animator.toCss(position),
              to: animator.toCss({transform: ''})
            })
            .start()
            .then(resolve);
  
          });
        }
docs: Place the menu into the DOM and call positioning related functions