Closed
Description
Bug, feature request, or proposal:
Given usage like:
<md-sidenav-container>
<md-sidenav>
<ul></ul>
</md-sidenav>
<my-component></my-component>
</md-sidenav-container>
Because my-component
is not a child of the md-sidenav
element, you can't inject MdSidenav into it, which makes programmatically toggling the Sidenav rather difficult (either you end up having to @ViewChild() query for it, and wiring that all up through your own service)
What is the expected behavior?
Developers should have an easy way to programmatically control the md-sidenav
What is the current behavior?
See above
Is there anything else we should know?
Material 1 provided a $sideNav
service, which is the kind of thing i'm describing here: https://material.angularjs.org/latest/api/service/$mdSidenav