fix(): OnPush does not work for the SidenavLayout.

This commit is contained in:
Hans Larsen
2016-02-16 11:53:40 -08:00
parent f711d8a21d
commit 93fc4ff67b
+3 -1
View File
@@ -244,7 +244,9 @@ export class MdSidenav {
directives: [MdSidenav],
templateUrl: './components/sidenav/sidenav.html',
styleUrls: ['./components/sidenav/sidenav.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
// Do not use ChangeDetectionStrategy.OnPush. It does not work for this component because
// technically it is a sibling of MdSidenav (on the content tree) and isn't updated when MdSidenav
// changes its state.
})
export class MdSidenavLayout implements AfterContentInit {
@ContentChildren(MdSidenav) private sidenavs_: QueryList<MdSidenav>;