title: Angular: close ng-sidenav after a click on a element
body: <p>Using angular &amp; material, I have a sidenav on the left used to provide user's function (login, signup...).</p>
  
  <p>Working fine, but I want the bar to be closed automatically once the user clicks on a menu. Currently, the bar stays open.</p>
  
  <p>The sidebar code:</p>
  
  <pre><code>&lt;md-sidenav md-component-id="user_sidenav" class="md-sidenav-left" flex&gt;
      &lt;md-menu-content flex&gt;
          &lt;md-menu-item&gt;
              &lt;md-button ui-sref="app.user-state()"&gt;
                  &lt;span&gt;
                    User
                  &lt;/span&gt;
              &lt;/md-button&gt;
          &lt;/md-menu-item&gt;
          &lt;md-menu-item&gt;
              &lt;md-button ui-sref="vlg.user-other-state()"&gt;
                  &lt;span&gt;
                    Other
                  &lt;/span&gt;
              &lt;/md-button&gt;
          &lt;/md-menu-item&gt;
  ...
  </code></pre>
  
  <p>Any idea?</p>