mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(): OnPush does not work for the SidenavLayout.
This commit is contained in:
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user