src/components/menu/js/menuServiceProvider.js
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'))
        });
      }
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'))
        });
      }
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' ) ) } ) ; }
Check for valid opts and set some sane defaults
Check for valid opts and set some sane defaults