title: Can't use $mdSelect in angularjs directive
body: <p>I've been working on a way to close the md-select when a md-menu is closed. I've got that figured out > <a href="https://codepen.io/anon/pen/jxXbrX" rel="nofollow noreferrer">https://codepen.io/anon/pen/jxXbrX</a>.</p>
  
  <p>But now I'm trying to implement that in my own application but I'm getting <code>$mdSelect.hide is not a function</code> message in my browser console.</p>
  
  <p>This is the directive:</p>
  
  <pre><code>namespace Xxx{
      angular.module('Xxx')
      .directive('mdCloseSelect', ['$mdSelect', ($mdSelect) =&gt; {
          return {
              link (scope, element, attrs, $mdSelect) {
                  scope.$on('$mdMenuClose', (ev, element, $mdSelect) =&gt; {
  
                      $mdSelect.hide();
  
                  });
              }
          };
      }]);
  }
  </code></pre>
  
  <p>I think the problem is with the declaration of <code>$mdSelect</code> but I can't find how I should declare it properly. </p>