Skip to content

Commit

Permalink
chore(list): switch to OnPush change detection (#5520)
Browse files Browse the repository at this point in the history
Switches the `md-list` and `md-list-item` to `OnPush` change detection.

Relates to #5035.
  • Loading branch information
crisbeto authored and mmalerba committed Jul 7, 2017
1 parent b3957d8 commit 4d3919b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/lib/list/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import {
Optional,
QueryList,
Renderer2,
ViewEncapsulation
ViewEncapsulation,
ChangeDetectionStrategy,
} from '@angular/core';
import {coerceBooleanProperty, MdLine, MdLineSetter} from '../core';

Expand All @@ -36,7 +37,8 @@ export class MdListDivider {}
host: {'role': 'list'},
template: '<ng-content></ng-content>',
styleUrls: ['list.css'],
encapsulation: ViewEncapsulation.None
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class MdList {
private _disableRipple: boolean = false;
Expand Down Expand Up @@ -120,7 +122,8 @@ export class MdListSubheaderCssMatStyler {}
'(blur)': '_handleBlur()',
},
templateUrl: 'list-item.html',
encapsulation: ViewEncapsulation.None
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class MdListItem implements AfterContentInit {
private _lineSetter: MdLineSetter;
Expand Down

0 comments on commit 4d3919b

Please sign in to comment.