code: function sanitizeAndConfigure() {
          if (!opts.target) {
            throw Error(
              '$mdMenu.show() expected a target to animate from in options.target'
            );
          }
          angular.extend(opts, {
            alreadyOpen: false,
            isRemoved: false,
            target: angular.element(opts.target), // make sure it's not a naked DOM node
            parent: angular.element(opts.parent),
            menuContentEl: angular.element(element[0].querySelector('md-menu-content'))
          });
        }
docs: Check for valid opts and set some sane defaults