Problems with property opened in Angular Material --> sidenav
See original GitHub issueI’ve a problem with sidenav, with the property “opened” of md-sidenav
I’ve this code:
<md-sidenav #sidenav mode="side" class="app-sidenav" opened="true">
...
</md-sidenav>
When I refresh the page, sidenav is open and it’s ok, but when I click in the button for close sidenav, I’ve the next errors in console:
error_handler.js:45 EXCEPTION: Uncaught (in promise): undefined error_handler.js:50 ORIGINAL STACKTRACE: error_handler.js:51 Error: Uncaught (in promise): undefined at resolvePromise (zone.js:429) at MdSidenav._openPromiseReject (zone.js:406) at MdSidenav._onTransitionEnd (sidenav.js:152) at DebugAppView._View_AppComponent0._handle_transitionend_5_0 (AppComponent.ngfactory.js:2129) at view.js:404 at dom_renderer.js:249 at dom_events.js:26 at ZoneDelegate.invoke (zone.js:203) at Object.onInvoke (ng_zone_impl.js:43) at ZoneDelegate.invoke (zone.js:202) zone.js:357 Error: Uncaught (in promise): undefined(…)
My version of Angular Material is: 2.0.0-alpha.9 My version of Sidenav is: 2.0.0-alpha.8-2
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:11 (3 by maintainers)
Top GitHub Comments
Hi, This is the temporal solution:
I hope it will be helpful to you.
As of 2.0.0-alpha.9 there is only a single package called @angular/material you can uninstall all @angular2-material/* packages, as all controls are now in @angular/material.
Note: also, update your NgModule to only reference MaterialModule / MaterialModule.forRoot()